r84186 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r84185‎ | r84186 | r84187 >
Date:17:56, 17 March 2011
Author:tomasz
Status:ok
Tags:
Comment:
Syncing up to head of trunk from r81457
Modified paths:
  • /branches/wmf/1.17wmf1/extensions/WikimediaMobile (modified) (history)
  • /branches/wmf/1.17wmf1/extensions/WikimediaMobile/MobileRedirect.js (modified) (history)

Diff [purge]

Index: branches/wmf/1.17wmf1/extensions/WikimediaMobile/MobileRedirect.js
@@ -5,18 +5,13 @@
66 *
77 * You can turn off the redirect by setting the cookie "stopMobileRedirect=true"
88 */
9 -if ( /(Android|iPhone|iPod|webOS|NetFront|Opera Mini|SEMC-Browser|PlayStation Portable|Nintendo Wii|BlackBerry)/
10 - .test( navigator.userAgent ) )
 9+if ( /(iPhone|iPod|Android.*Mobile|webOS|NetFront|Opera Mini|SEMC-Browser|PlayStation Portable|Nintendo Wii|BlackBerry)/
 10+ .test( navigator.userAgent ) )
1111 {
12 -
1312 if ( (document.cookie.indexOf("irect=t") < 0) // Don't redirect if we have the stop cookie ... only testing a subportion of the cookie. Should be REALLY unique!
14 - /*&& (wgNamespaceNumber >= 0) // Don't redirect special pages
15 - && (wgAction == "view")) // Don't redirect URLs that aren't simple page views
16 - */
17 - && (!document.getElementsByClassName || document.getElementsByClassName( 'ns--1' ).length == 0)
18 - && (document.location.href.indexOf( 'action=' ) == -1 || document.location.href.indexOf( 'action=view' ) != -1 ))
 13+ && (!document.getElementsByClassName || document.getElementsByClassName( 'ns--1' ).length == 0)
 14+ && (document.location.href.indexOf( 'action=' ) == -1 || document.location.href.indexOf( 'action=view' ) != -1 )) // Don't redirect URLs that aren't simple page views
1915 {
20 -
2116 // If we've made it here, then we are going ahead with the redirect
2217
2318 // If we are NOT on the main page, then set the pageName!
Property changes on: branches/wmf/1.17wmf1/extensions/WikimediaMobile
___________________________________________________________________
Modified: svn:mergeinfo
2419 Merged /trunk/extensions/WikimediaMobile:r83113,83160-84185

Past revisions this follows-up on

RevisionCommit summaryAuthorDate
r81457Creating new WMF branchcatrope15:31, 3 February 2011

Status & tagging log