MediaWiki:Common.js: Difference between revisions
Appearance
Johnball589 (talk | contribs) No edit summary |
Johnball589 (talk | contribs) No edit summary |
||
Line 6: | Line 6: | ||
var prankMonth = 10; // October | var prankMonth = 10; // October | ||
var prankDay = 12; // test day | var prankDay = 12; // your test day | ||
var pageName = mw.config.get('wgPageName'); | var pageName = mw.config.get('wgPageName'); | ||
// Only redirect if it's the prank day | |||
if (month === prankMonth && day === prankDay) { | if (month === prankMonth && day === prankDay) { | ||
// | |||
// Don’t redirect these special pages | |||
if ( | if ( | ||
!pageName.startsWith('AF:') && | !pageName.startsWith('AF:') && | ||
pageName !== 'MediaWiki:Common.js' | |||
) { | ) { | ||
// If it's the main page | |||
if (pageName === 'Main_Page') { | if (pageName === 'Main_Page') { | ||
window.location.href = '/wiki/AF:Main_Page'; | window.location.href = '/wiki/AF:Main_Page'; |