mirror of
https://github.com/xiaoyifang/goldendict-ng.git
synced 2024-11-27 19:24:08 +00:00
fix:relative url handle
This commit is contained in:
parent
47faab5a52
commit
d5af210785
|
@ -2,6 +2,10 @@
|
||||||
$(function() {
|
$(function() {
|
||||||
$("a").click(function(event) {
|
$("a").click(function(event) {
|
||||||
var link = $(this).attr("href");
|
var link = $(this).attr("href");
|
||||||
|
if(link.indexOf("://")>=0){
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
var newLink;
|
var newLink;
|
||||||
if (link.startsWith("#")) {
|
if (link.startsWith("#")) {
|
||||||
newLink = window.location.href + link;
|
newLink = window.location.href + link;
|
||||||
|
|
Loading…
Reference in a new issue