fixed 修复跳转bug

This commit is contained in:
Vaica committed 2026-01-22 10:44:33 +08:00
1 parent 42533415a7
commit c70835138f
3 files changed
+3 -2

No files matched your search

+1
View File
@@ -2,5 +2,6 @@
title: "跳转页面"
date: 2024-08-03
layout: "tiaozhuan"
url: "tiaozhuan.html"
draft: false
---
@@ -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 }}
>
+1 -1
View File
@@ -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');
}
});