From 1c3612f7203ce0e090de5e1a43bb02a0301c778a Mon Sep 17 00:00:00 2001 From: yifang Date: Fri, 31 Dec 2021 22:15:51 +0800 Subject: [PATCH] fix:inside page #hashtag and redirect --- resources/gd_custom.js | 13 +++++++++++++ 1 file changed, 13 insertions(+) create mode 100644 resources/gd_custom.js diff --git a/resources/gd_custom.js b/resources/gd_custom.js new file mode 100644 index 00000000..69e4742f --- /dev/null +++ b/resources/gd_custom.js @@ -0,0 +1,13 @@ +//document ready , +$(function() { + $("a").click(function(event) { + var link = $(this).attr("href"); + if (link.indexOf("://") < 0) { + var newLink = window.location.href + "/" + link; + $(this).attr("href", newLink); + } + }); + + } + +); \ No newline at end of file