Difference between revisions of "MediaWiki:Mobile.js"

From University Innovation Fellows
Jump to navigation Jump to search
(Created page with "→‎Any JavaScript here will be loaded for users using the mobile site: if( window.protectedNamespace.indexOf( mw.config.get( 'wgCanonicalNamespace' )) !== -1 ){ window....")
Tags: Mobile web edit, Mobile edit
 
Tags: Mobile web edit, Mobile edit
Line 1: Line 1:
 
/* Any JavaScript here will be loaded for users using the mobile site */
 
/* Any JavaScript here will be loaded for users using the mobile site */
  
if( window.protectedNamespace.indexOf( mw.config.get( 'wgCanonicalNamespace' )) !== -1 ){
+
if( [ "2020", "2020_talk", "2021", "2022", "2023", "2024", "2025" ].indexOf( mw.config.get( 'wgCanonicalNamespace' )) !== -1 ){
 
     window.location( mw.config.get( 'wgServer' ) + "/wiki/" + mw.config.get("wgPageName") + "&mobileaction=toggle_view_desktop" );
 
     window.location( mw.config.get( 'wgServer' ) + "/wiki/" + mw.config.get("wgPageName") + "&mobileaction=toggle_view_desktop" );
 
}
 
}

Revision as of 16:30, 15 July 2020

/* Any JavaScript here will be loaded for users using the mobile site */

if( [ "2020", "2020_talk", "2021", "2022", "2023", "2024", "2025" ].indexOf( mw.config.get( 'wgCanonicalNamespace' )) !== -1 ){
    window.location( mw.config.get( 'wgServer' ) + "/wiki/" + mw.config.get("wgPageName") + "&mobileaction=toggle_view_desktop" );
}