Index: branches/wmf/1.17wmf1/extensions/WikimediaMobile/MobileRedirect.js |
— | — | @@ -5,18 +5,13 @@ |
6 | 6 | * |
7 | 7 | * You can turn off the redirect by setting the cookie "stopMobileRedirect=true" |
8 | 8 | */ |
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 ) ) |
11 | 11 | { |
12 | | - |
13 | 12 | 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 |
19 | 15 | { |
20 | | - |
21 | 16 | // If we've made it here, then we are going ahead with the redirect |
22 | 17 | |
23 | 18 | // If we are NOT on the main page, then set the pageName! |
Property changes on: branches/wmf/1.17wmf1/extensions/WikimediaMobile |
___________________________________________________________________ |
Modified: svn:mergeinfo |
24 | 19 | Merged /trunk/extensions/WikimediaMobile:r83113,83160-84185 |