Skip to content

Commit d88858c

Browse files
gui update
1 parent 3d28476 commit d88858c

File tree

1 file changed

+18
-8
lines changed

1 file changed

+18
-8
lines changed

docs/source/_static/pop-plankton.js

Lines changed: 18 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -24,15 +24,25 @@ var vpos = 'bottom:' + (Math.floor(Math.random() * 80) + 10) + '%;';
2424
var img = document.createElement("img");
2525

2626
current_path = document.location;
27-
28-
if ((document.location.pathname.split('/')).includes("rst")){
29-
img.src = "../../_images/plankton-only.svg";
30-
}
31-
else if ((document.location.pathname.split('/')).slice(-1)==""){
32-
img.src = "./_images/plankton-only.svg";
27+
if (document.location.origin == "null") { //local file
28+
if ((document.location.pathname.split('/')).includes("rst")) {
29+
img.src = "../_images/plankton-only.svg";
30+
}
31+
else {
32+
img.src = "../_images/plankton-only.svg";
33+
}
3334
}
34-
else{
35-
img.src = "../_images/plankton-only.svg";
35+
else {
36+
img.src=document.location.pathname.split('/').slice(0,3).join("/")+"_images/plankton-only.svg";
37+
// if ((document.location.pathname.split('/')).includes("rst")) {
38+
// img.src = "../../_images/plankton-only.svg";
39+
// }
40+
// else if ((document.location.pathname.split('/')).slice(-1) == "") {
41+
// img.src = "./_images/plankton-only.svg";
42+
// }
43+
// else {
44+
// img.src = "../_images/plankton-only.svg";
45+
// }
3646
}
3747

3848
img.id = "pop-plankton";

0 commit comments

Comments
 (0)