fixed 修复跳转bug
This commit is contained in:
1 parent
42533415a7
commit
c70835138f
3 files changed
+3
-2
No files matched your search
@@ -3,7 +3,7 @@
|
||||
{{ if or (in $url "www.usj.cc") (strings.HasPrefix $url "/") }}
|
||||
href="{{ $url }}"
|
||||
{{ else }}
|
||||
href="/tiaozhuan/index.html?target={{ $url | base64Encode }}"
|
||||
href="/tiaozhuan.html?target={{ $url | base64Encode }}"
|
||||
{{ end }}
|
||||
{{ if strings.HasPrefix .Destination "http" }} target="_blank"{{ end }}
|
||||
>
|
||||
|
||||
@@ -27,7 +27,7 @@ function checkParent(element, classNames) {
|
||||
target.hostname !== window.location.hostname) {
|
||||
e.preventDefault();
|
||||
let encodedUrl = btoa(target.href); // Base64 encode the URL
|
||||
let url = '/tiaozhuan/index.html?target=' + encodedUrl;
|
||||
let url = '/tiaozhuan.html?target=' + encodedUrl;
|
||||
window.open(url, '_blank');
|
||||
}
|
||||
});
|
||||
|
||||
Reference in new issue
Block a user