r81700 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r81699‎ | r81700 | r81701 >
Date:08:29, 8 February 2011
Author:brion
Status:ok (Comments)
Tags:
Comment:
Fix bug 27238: revert the rest of r81128 (tests were already removed): change to redirect behavior caused iPad to redirect to mobile site, which it shouldn't.
It sounds like the intent of the tweak was for Android tablets that don't put "Mobile" in their user-agent strings to not redirect to the mobile site... which had massive side effects as it didn't actually check for Android at all.
Modified paths:
  • /trunk/extensions/WikimediaMobile/MobileRedirect.js (modified) (history)

Diff [purge]

Index: trunk/extensions/WikimediaMobile/MobileRedirect.js
@@ -5,7 +5,7 @@
66 *
77 * You can turn off the redirect by setting the cookie "stopMobileRedirect=true"
88 */
9 -if ( /(Mobile.*Safari|webOS|NetFront|Opera Mini|SEMC-Browser|PlayStation Portable|Nintendo Wii|BlackBerry)/
 9+if ( /(Android|iPhone|iPod|webOS|NetFront|Opera Mini|SEMC-Browser|PlayStation Portable|Nintendo Wii|BlackBerry)/
1010 .test( navigator.userAgent ) )
1111 {
1212 (function () {

Past revisions this follows-up on

RevisionCommit summaryAuthorDate
r81128Tests for WikimediaMobile Redirect JS and a tweak requested by Google...reedy12:51, 28 January 2011

Comments

#Comment by Reedy (talk | contribs)   09:50, 8 February 2011

Lol.

For Android 3.0 on tablets, google want the full site to be displayed, hence the change

Also, NB, it's not actually mine commit ;)

#Comment by Brion VIBBER (talk | contribs)   09:52, 8 February 2011

Yes, but it needs to be done without breaking other things that are already being used in the real world. :) bugzilla:27245

Status & tagging log