Jump to content

User:Designboy/common.js

From Wikipedia, the free encyclopedia
This is the current revision of this page, as edited by Designboy (talk | contribs) at 00:43, 12 August 2012 (Created page with 'jQuery(document).ready( function($) { // If this is (an iPhone or an iPod) and this is not a Wikipedia mobile page, then... if (((navigator.platform.indexOf(...'). The present address (URL) is a permanent link to this version.
(diff) ← Previous revision | Latest revision (diff) | Newer revision → (diff)
Note: After saving, you have to bypass your browser's cache to see the changes. Google Chrome, Firefox, Microsoft Edge and Safari: Hold down the ⇧ Shift key and click the Reload toolbar button. For details and instructions about other browsers, see Wikipedia:Bypass your cache.
jQuery(document).ready( function($) {
  // If this is (an iPhone or an iPod) and this is not a Wikipedia mobile page, then...
  if (((navigator.platform.indexOf("iPhone") != -1) || (navigator.platform.indexOf("iPod") != -1))
       && window.location.hostname.indexOf(".m.wikipedia.org") == -1 ){
       // ... set stopMobileRedirects cookie to false. The next click on the "Mobile View" link
       // at the bottom of the page (it's on every page), will then switch to the mobile view.
       document.cookie = "stopMobileRedirect=false; expires=09-Aug-2012 00:00:00 GMT; path=/; domain=.wikipedia.org";
  }
});