mirror of
https://huihui.cat/mirrors/MikroTikPatch.git
synced 2025-12-10 03:24:37 +01:00
Update index.html
Signed-off-by: elseif <elseif@live.cn>
This commit is contained in:
parent
826072d302
commit
e338ddb7b2
1 changed files with 4 additions and 0 deletions
|
|
@ -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…
Add table
Reference in a new issue