Difference between revisions of "User:One-Six/fullpagename.js"
(Created page with "let mwFullPageName = window.location.href.replace(/http(s|):\/\/en.moegirl.org\//,""); if(/index\.php/g.test(mwFullPageName)) { let match = /title=(.+?)(?:&|$)/g.exec(mwFu...") |
m (// Edit via Wikiplus) |
||
Line 7: | Line 7: | ||
} | } | ||
mwFullPageName = mwFullPageName.replace(/#.+$/,""); | mwFullPageName = mwFullPageName.replace(/#.+$/,""); | ||
− | console.log(mwFullPageName); | + | console.log("FULLPAGENAME:"+mwFullPageName); |
Revision as of 03:48, 28 June 2020
let mwFullPageName = window.location.href.replace(/http(s|):\/\/en.moegirl.org\//,""); if(/index\.php/g.test(mwFullPageName)) { let match = /title=(.+?)(?:&|$)/g.exec(mwFullPageName); mwFullPageName = match[match.length - 1]; } else { mwFullPageName = mwFullPageName.replace(/http(s|):\/\/en.moegirl.org\//,""); } mwFullPageName = mwFullPageName.replace(/#.+$/,""); console.log("FULLPAGENAME:"+mwFullPageName);