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
e5b8288b35
commit
500c7b5748
@ -501,11 +501,8 @@
|
|||||||
const ghProxyCheckbox = document.getElementById("gh-proxy");
|
const ghProxyCheckbox = document.getElementById("gh-proxy");
|
||||||
const clearCacheBtn = document.getElementById("clear-cache");
|
const clearCacheBtn = document.getElementById("clear-cache");
|
||||||
ghProxyCheckbox.checked = localStorage.getItem("gh-proxy-enabled") === "true";
|
ghProxyCheckbox.checked = localStorage.getItem("gh-proxy-enabled") === "true";
|
||||||
if (ghProxyCheckbox.checked) {
|
clearCacheBtn.style.display = ghProxyCheckbox.checked ? "inline-flex" : "none";
|
||||||
clearCacheBtn.style.removeProperty("display");
|
|
||||||
} else {
|
|
||||||
clearCacheBtn.style.display = "none";
|
|
||||||
}
|
|
||||||
function updateAllDownloadLinks() {
|
function updateAllDownloadLinks() {
|
||||||
document.querySelectorAll('a[href*="github.com/elseif/MikroTikPatch"]').forEach(link => {
|
document.querySelectorAll('a[href*="github.com/elseif/MikroTikPatch"]').forEach(link => {
|
||||||
const isProxyEnabled = localStorage.getItem("gh-proxy-enabled") === "true";
|
const isProxyEnabled = localStorage.getItem("gh-proxy-enabled") === "true";
|
||||||
@ -522,7 +519,7 @@
|
|||||||
|
|
||||||
ghProxyCheckbox.addEventListener("change", () => {
|
ghProxyCheckbox.addEventListener("change", () => {
|
||||||
localStorage.setItem("gh-proxy-enabled", ghProxyCheckbox.checked ? "true" : "false");
|
localStorage.setItem("gh-proxy-enabled", ghProxyCheckbox.checked ? "true" : "false");
|
||||||
clearCacheBtn.style.display = ghProxyCheckbox.checked ? "block" : "none";
|
clearCacheBtn.style.display = ghProxyCheckbox.checked ? "inline-flex" : "none";
|
||||||
updateAllDownloadLinks();
|
updateAllDownloadLinks();
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user