mirror of
https://github.com/xiaoyifang/goldendict-ng.git
synced 2024-12-18 03:14:06 +00:00
fix:inside page #hashtag and redirect
This commit is contained in:
parent
5f956464e0
commit
1c3612f720
13
resources/gd_custom.js
Normal file
13
resources/gd_custom.js
Normal file
|
@ -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);
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
);
|
Loading…
Reference in a new issue