nothing but errors in JS console now...
This commit is contained in:
parent
6c72e4fd8e
commit
07270aabc8
|
@ -9,29 +9,20 @@
|
||||||
console.log("Copyright *my code only, anything that is not my code is published and copyrighted by their respective owners* Wesley Bryie, 2021.");
|
console.log("Copyright *my code only, anything that is not my code is published and copyrighted by their respective owners* Wesley Bryie, 2021.");
|
||||||
console.log("This website was designed and published to https://wesbryie.cf/. If you see it on a domain that is not wesbryie.cf please contact me at wesleybryie@protonmail.com.");
|
console.log("This website was designed and published to https://wesbryie.cf/. If you see it on a domain that is not wesbryie.cf please contact me at wesleybryie@protonmail.com.");
|
||||||
|
|
||||||
function getDomainName(url, subdomain) {
|
var firstDot = window.location.hostname.indexOf('.');
|
||||||
subdomain = subdomain || false;
|
var tld = ".cf";
|
||||||
|
var isSubdomain = firstDot < window.location.hostname.indexOf(tld);
|
||||||
|
var domain;
|
||||||
|
|
||||||
url = url.replace(/(https?:\/\/)?(www.)?/i, '');
|
if (isSubdomain) {
|
||||||
|
domain = window.location.hostname.substring(firstDot == -1 ? 0 : firstDot + 1);
|
||||||
if (!subdomain) {
|
}
|
||||||
url = url.split('.');
|
else {
|
||||||
|
domain = window.location.hostname;
|
||||||
url = url.slice(url.length - 2).join('.');
|
|
||||||
}
|
|
||||||
|
|
||||||
if (url.indexOf('/') !== -1) {
|
|
||||||
return url.split('/')[0];
|
|
||||||
}
|
|
||||||
|
|
||||||
return url;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
getDomainName();
|
|
||||||
|
|
||||||
function isDomainCorrect() {
|
function isDomainCorrect() {
|
||||||
if ("url" = "*wesbryie.cf") {
|
if (domain = "wesbryie") {
|
||||||
console.log("This websites javascript code says that it is correct.");
|
console.log("This websites javascript code says that it is correct.");
|
||||||
stop();
|
stop();
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue