mirror of
https://github.com/xiaoyifang/goldendict-ng.git
synced 2024-11-24 04:24:09 +00:00
fix: relative url with gdanchor parameter
This commit is contained in:
parent
5406551b57
commit
9b1f25f3f4
|
@ -27,12 +27,17 @@ $(function() {
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
index = href.indexOf("?");
|
index = href.indexOf("?");
|
||||||
if(index>-1)
|
|
||||||
{
|
if (link.indexOf("?gdanchor") > -1) {
|
||||||
newLink = href.substring(0, index) + "?word=" + link;
|
newLink = "gdlookup://localhost/" + link;
|
||||||
}
|
}
|
||||||
else{
|
else {
|
||||||
newLink=href+"?word=" + link;
|
if (index > -1) {
|
||||||
|
newLink = href.substring(0, index) + "?word=" + link;
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
newLink = href + "?word=" + link;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
$(this).attr("href", newLink);
|
$(this).attr("href", newLink);
|
||||||
|
|
Loading…
Reference in a new issue