Difference between revisions of "MediaWiki:Common.js"

From Electowiki
Jump to: navigation, search
(kludgey redirect script to start redirecting selected pages)
(No difference)

Revision as of 15:46, 8 February 2019

/* Any JavaScript here will be loaded for all users on every page load. */
var redirThesePages = ['Summability_criterion'];

if(redirThesePages.includes(mw.config.values.wgPageName) && mw.config.values.wgAction === 'view'){
    console.log("redirecting...")
    window.setTimeout(function(){
        window.location.href = "https://electowiki.org/wiki/" + mw.config.values.wgPageName;
    }, 5000);
}