mNo edit summary |
m change to function |
||
Line 1: | Line 1: | ||
let | const hrefFullPageNamee = () => { | ||
if(/index\.php/g.test( | let fullPageNamee = window.location.href.replace(/http(s|):\/\/en.moegirl.org\//,""); | ||
if(/index\.php/g.test(fullPageNamee)) { | |||
let array = [...fullPageNamee.matchAll(/title=(.+?)(?:&|$)/g)]; | |||
} | fullPageNamee = array[array.length - 1][1]; | ||
} | |||
return fullPageNamee.replace(/#.+$/,""); | |||
//console.log("FULLPAGENAME:"+fullPageNamee); | |||
console.log("FULLPAGENAME:"+ | }; |
const hrefFullPageNamee = () => {
let fullPageNamee = window.location.href.replace(/http(s|):\/\/en.moegirl.org\//,"");
if(/index\.php/g.test(fullPageNamee)) {
let array = [...fullPageNamee.matchAll(/title=(.+?)(?:&|$)/g)];
fullPageNamee = array[array.length - 1][1];
}
return fullPageNamee.replace(/#.+$/,"");
//console.log("FULLPAGENAME:"+fullPageNamee);
};