mirror of
https://github.com/Azgaar/Fantasy-Map-Generator.git
synced 2025-12-22 03:51:23 +01:00
Added simple detection for relative link to default to watabou
This commit is contained in:
parent
05244e9f63
commit
d500afdf1b
1 changed files with 9 additions and 1 deletions
10
script.js
10
script.js
|
|
@ -4024,7 +4024,15 @@ function fantasyMap() {
|
|||
win.focus();
|
||||
break;
|
||||
default:
|
||||
win = window.open(burgLink.value, '_blank');
|
||||
if(burgLink.value.length < 4 || burgLink.value[0] != "h" || burgLink.value[1] != "t" || burgLink.value[2] != "t" || burgLink.value[3] != "p") {
|
||||
if(burgLink.value[4] !== "?") {
|
||||
win = window.open("http://fantasycities.watabou.ru/?" + burgLink.value, '_blank');
|
||||
} else {
|
||||
win = window.open("http://fantasycities.watabou.ru/" + burgLink.value, '_blank');
|
||||
}
|
||||
} else {
|
||||
win = window.open(burgLink.value, '_blank');
|
||||
}
|
||||
win.focus();
|
||||
break;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue