mirror of
https://github.com/elseif/MikroTikPatch
synced 2026-07-17 18:49:41 +00:00
Update index.html
Signed-off-by: elseif <elseif@live.cn>
This commit is contained in:
parent
826072d302
commit
e338ddb7b2
@ -611,6 +611,10 @@
|
||||
// GitHub proxy functionality
|
||||
const ghProxyCheckbox = document.getElementById("gh-proxy");
|
||||
const clearCacheBtn = document.getElementById("clear-cache");
|
||||
if (localStorage.getItem("gh-proxy-enabled") === null && navigator.language.startsWith("zh")) {
|
||||
// Enable GitHub proxy by default for Chinese users
|
||||
localStorage.setItem("gh-proxy-enabled", "true");
|
||||
}
|
||||
ghProxyCheckbox.checked = localStorage.getItem("gh-proxy-enabled") === "true";
|
||||
clearCacheBtn.style.display = ghProxyCheckbox.checked ? "inline-flex" : "none";
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user