New js to add .php if served locally [dev]
This commit is contained in:
1 parent
1fa0ed1a9c
commit
2b2106c0b5
3 files changed
+26
-16
No files matched your search
@@ -0,0 +1,9 @@
|
||||
function givePHP() {
|
||||
var elements = document.getElementsByClassName("givePHP");
|
||||
len = elements !== null ? elements.length : 0;
|
||||
i = 0;
|
||||
for (i; i < len; i++) {
|
||||
if(elements[i].href != "http://localhost/")
|
||||
elements[i].href += ".php";
|
||||
}
|
||||
}
|
||||
@@ -99,6 +99,7 @@ function load() {
|
||||
setCookie("darkmode", false, 999);
|
||||
}
|
||||
checkDarkmode();
|
||||
if(location.hostname == "localhost") givePHP();
|
||||
}
|
||||
|
||||
/*Cookie scripts*/
|
||||
|
||||
Reference in new issue
Block a user