Difference between revisions of "MediaWiki:Common.js"

From Electowiki
Jump to: navigation, search
(kludgey redirect script to start redirecting selected pages)
 
(removing the Javascript redirect for now)
 
Line 1: Line 1:
 
/* Any JavaScript here will be loaded for all users on every page load. */
 
/* 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);
 
}
 

Latest revision as of 22:20, 17 February 2019

/* Any JavaScript here will be loaded for all users on every page load. */