diff --git a/index.html b/index.html
index f80646a..7419df2 100644
--- a/index.html
+++ b/index.html
@@ -196,11 +196,6 @@
@@ -366,8 +343,6 @@
infoLabel2:`For more information about
install and upgrade see the
Documentation. For more information about
patch see the
MikroTikPatch.`,
installCmdLabel:"Install Command",
proxyLabel:"Enable GitHub Proxy Accelerator",
- clearCache:"Clear gh-proxy Cache",
- copyUrlsClearCache:"Copy URLs & Open Clear Cache Page",
loading:"Loading latest versions...",
quickInformation:"Quick Information",
settings:"Settings",
@@ -382,8 +357,6 @@
infoLabel2:`有关
安装和升级的更多信息,请参阅
文档有关
Patch的更多信息,请参阅
MikroTikPatch`,
installCmdLabel:"安装命令",
proxyLabel:"启用GitHub代理加速",
- clearCache:"清除gh-proxy缓存",
- copyUrlsClearCache:"复制链接并打开缓存清除页面",
loading:"正在加载最新版本...",
quickInformation:"快速信息",
settings:"设置",
@@ -400,11 +373,7 @@
const key = el.getAttribute("data-i18n");
if (i18n[lang] && i18n[lang][key]) {
// Special handling for buttons that need icons
- if (key === 'clearCache') {
- el.innerHTML = `
${i18n[lang][key]}`;
- } else if (key === 'copyUrlsClearCache' && el.id === 'copy-to-clear-cache') {
- el.innerHTML = `
${i18n[lang][key]}`;
- } else if (key === 'installCmdLabel') {
+ if (key === 'installCmdLabel') {
el.innerHTML = `
${i18n[lang][key]}`;
}
else {
@@ -618,13 +587,11 @@
// 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";
// Update all download links with/without GitHub proxy
function updateAllDownloadLinks() {
@@ -646,33 +613,9 @@
// GitHub proxy toggle event listener
ghProxyCheckbox.addEventListener("change", () => {
localStorage.setItem("gh-proxy-enabled", ghProxyCheckbox.checked ? "true" : "false");
- clearCacheBtn.style.display = ghProxyCheckbox.checked ? "inline-flex" : "none";
updateAllDownloadLinks();
});
- // Cache clearing modal functionality
- const modal = document.getElementById("urls-pannel");
- const modalContent = document.getElementById("modal-content");
- clearCacheBtn.addEventListener("click", () => {
- const links = document.querySelectorAll('a[href^="https://gh-proxy.com/https://github.com/elseif/MikroTikPatch/"]');
- document.getElementById("urls-list").innerText = Array.from(links).map(a => a.href).filter(href => !href.includes(".yml")).join("\n");
- modal.classList.remove('hidden');
- setTimeout(() => { modalContent.classList.add('opacity-100', 'scale-100'); modalContent.classList.remove('opacity-0', 'scale-95'); }, 10);
- });
-
- // Modal close functionality
- document.getElementById("urls-close").addEventListener("click", () => {
- modalContent.classList.remove('opacity-100', 'scale-100');
- modalContent.classList.add('opacity-0', 'scale-95');
- setTimeout(() => modal.classList.add('hidden'), 200);
- });
-
- // Copy URLs and open cache clearing page
- document.getElementById("copy-to-clear-cache").addEventListener("click", () => {
- navigator.clipboard.writeText(document.getElementById("urls-list").innerText);
- window.open("https://cache.gh-proxy.com/", "_blank");
- document.getElementById("urls-close").click();
- });
// Changelog modal functionality
const changelogModal = document.getElementById("changelog-modal");