修复404 中间页报错
This commit is contained in:
1 parent
afeda0b6b4
commit
ae8b42c85b
2 files changed
+4
-4
No files matched your search
@@ -16,14 +16,14 @@ function checkParent(element, classNames) {
|
|||||||
}
|
}
|
||||||
if (target && target.nodeName === 'A' &&
|
if (target && target.nodeName === 'A' &&
|
||||||
!checkParent(target, excludedClasses) &&
|
!checkParent(target, excludedClasses) &&
|
||||||
!target.href.includes('koobai.com') &&
|
!target.href.includes('usj.cc') &&
|
||||||
!target.href.includes('douban.com') &&
|
!target.href.includes('douban.com') &&
|
||||||
!target.href.includes('bilibili.com') &&
|
!target.href.includes('bilibili.com') &&
|
||||||
!target.href.includes('github.com') &&
|
!target.href.includes('github.com') &&
|
||||||
target.hostname !== window.location.hostname) {
|
target.hostname !== window.location.hostname) {
|
||||||
e.preventDefault();
|
e.preventDefault();
|
||||||
let encodedUrl = btoa(target.href); // Base64 encode the URL
|
let encodedUrl = btoa(target.href); // Base64 encode the URL
|
||||||
let url = '/tiaozhuan?target=' + encodedUrl;
|
let url = '/tiaozhuan/index.html?target=' + encodedUrl;
|
||||||
window.open(url, '_blank');
|
window.open(url, '_blank');
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|||||||
@@ -16,14 +16,14 @@ function checkParent(element, classNames) {
|
|||||||
}
|
}
|
||||||
if (target && target.nodeName === 'A' &&
|
if (target && target.nodeName === 'A' &&
|
||||||
!checkParent(target, excludedClasses) &&
|
!checkParent(target, excludedClasses) &&
|
||||||
!target.href.includes('koobai.com') &&
|
!target.href.includes('usj.cc') &&
|
||||||
!target.href.includes('douban.com') &&
|
!target.href.includes('douban.com') &&
|
||||||
!target.href.includes('bilibili.com') &&
|
!target.href.includes('bilibili.com') &&
|
||||||
!target.href.includes('github.com') &&
|
!target.href.includes('github.com') &&
|
||||||
target.hostname !== window.location.hostname) {
|
target.hostname !== window.location.hostname) {
|
||||||
e.preventDefault();
|
e.preventDefault();
|
||||||
let encodedUrl = btoa(target.href); // Base64 encode the URL
|
let encodedUrl = btoa(target.href); // Base64 encode the URL
|
||||||
let url = '/tiaozhuan?target=' + encodedUrl;
|
let url = '/tiaozhuan/index.html?target=' + encodedUrl;
|
||||||
window.open(url, '_blank');
|
window.open(url, '_blank');
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|||||||
Reference in new issue
Block a user