mirror of
https://github.com/tuna/mirror-web.git
synced 2025-12-25 20:32:46 +00:00
help: redirect remove/disbled mirror to mirrorz help
This commit is contained in:
parent
1c1f174dcb
commit
d688f4c644
|
|
@ -35,6 +35,7 @@ hide_server_status: false
|
|||
hide_mirrorz: false
|
||||
mirrorz_desc: 校园网联合镜像站
|
||||
mirrorz_link: "https://mirrors.cernet.edu.cn/list"
|
||||
mirrorz_help_link: "https://help.mirrors.cernet.edu.cn/"
|
||||
|
||||
# Build settings
|
||||
highlighter: rouge
|
||||
|
|
|
|||
|
|
@ -57,7 +57,11 @@ $(document).ready(() => {
|
|||
});
|
||||
console.log(window.mirrorId);
|
||||
if (!availableMirrorIds.has(window.mirrorId)) {
|
||||
location.href = "/404-help-hidden.html"; // this will break 404 issue submission
|
||||
if ({{ site.hide_mirrorz }}) {
|
||||
location.href = "/404-help-hidden.html"; // this will break 404 issue submission
|
||||
} else {
|
||||
location.href = "{{ site.mirrorz_help_link }}" + window.mirrorId; // TODO: convert this to mirrorz cname
|
||||
}
|
||||
}
|
||||
|
||||
$('li').filter((_, node) => node.id && node.id.startsWith("toc-") && !availableMirrorIds.has(node.id.slice(4))).remove();
|
||||
|
|
|
|||
Loading…
Reference in New Issue