MediaWiki:FandomMobile.js

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

//redirect user to desktop view. if(window.location.href.indexOf('mobileaction') !== -1){ window.location.replace(window.location.href.replace('mobileaction=', 'mobileaction=toggle_view_desktop&')); } else{ if(window.location.href.indexOf('?') !== -1){ window.location.replace(window.location.href + '&mobileaction=toggle_view_desktop'); } else{ window.location.replace(window.location.href + '?mobileaction=toggle_view_desktop'); } }

$(window).on('load', function{  //main page header.   var $btn = $('#box-wikiheader #box-wikiheader-toggle-link');   if($btn.length){      var $box = $('#box-wikiheader');      $btn.css('display', 'inline');      if($box.innerHeight > 180){         $box.addClass('collapsed');      }      $btn.on('click', function{ $box.toggleClass('collapsed'); });  } });