Skip to content

Commit 09c2140

Browse files
committed
feat(demo): add site selector
1 parent 6583075 commit 09c2140

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

src/cloudflare-worker/demo/demo.html

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,10 @@ <h1>LeetCode Stats Card</h1>
2929
<option value="contest">Contest</option>
3030
<option value="heatmap">Heatmap</option>
3131
</select>
32+
<select id="site">
33+
<option value="us" selected>Source: LeetCode</option>
34+
<option value="cn">Source: LeetCode CN</option>
35+
</select>
3236
<div>
3337
<button onclick="preview()">Preview</button>
3438
<button onclick="go()">Go</button>
@@ -97,7 +101,8 @@ <h1>LeetCode Stats Card</h1>
97101
encodeURIComponent(value("theme")) +
98102
"&font=" +
99103
encodeURIComponent(value("font")) +
100-
(value("extension") ? "&ext=" + encodeURIComponent(value("extension")) : "")
104+
(value("extension") ? "&ext=" + encodeURIComponent(value("extension")) : "") +
105+
(value("site") === "cn" ? "&site=cn" : "")
101106
);
102107
}
103108
function preview() {

0 commit comments

Comments
 (0)