Index: branches/wmf/1.17wmf1/extensions/WikimediaMobile/WikimediaMobile.php |
— | — | @@ -19,7 +19,7 @@ |
20 | 20 | /** |
21 | 21 | * Increment this when the JS file changes |
22 | 22 | */ |
23 | | -$wgWikimediaMobileVersion = '3'; |
| 23 | +$wgWikimediaMobileVersion = '4'; |
24 | 24 | |
25 | 25 | /** |
26 | 26 | * The base URL of the mobile gateway |
Index: branches/wmf/1.17wmf1/extensions/WikimediaMobile/MobileRedirect.js |
— | — | @@ -9,17 +9,18 @@ |
10 | 10 | .test( navigator.userAgent ) ) |
11 | 11 | { |
12 | 12 | |
13 | | - if ( (document.cookie.indexOf("eRedirect=t") < 0) // Don't redirect if we have the stop cookie ... only testing a subportion of the cookie. Should be REALLY unique! |
| 13 | + 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 | 14 | && (wgNamespaceNumber >= 0) // Don't redirect special pages |
15 | 15 | && (wgAction == "view")) // Don't redirect URLs that aren't simple page views |
16 | 16 | { |
| 17 | + |
17 | 18 | // If we've made it here, then we are going ahead with the redirect |
18 | | - var url = wgWikimediaMobileUrl; |
| 19 | + |
19 | 20 | // If we are NOT on the main page, then set the pageName! |
20 | 21 | if (wgPageName != wgMainPageTitle.replace(/ /g, '_')) { |
21 | | - url += '/' + encodeURI(wgPageName); |
| 22 | + wgWikimediaMobileUrl += '/' + encodeURI(wgPageName); |
22 | 23 | } |
23 | 24 | |
24 | | - document.location = url; |
| 25 | + document.location = wgWikimediaMobileUrl; |
25 | 26 | } |
26 | 27 | } |
Index: branches/wmf/1.17wmf1/extensions/WikimediaMobile/redirector_test.js |
— | — | @@ -48,7 +48,7 @@ |
49 | 49 | |
50 | 50 | if(((document.location != null) && (document.location.length > 0)) == shouldRedirect) { |
51 | 51 | if(options.should_redirect_to && (document.location != options.should_redirect_to)) { |
52 | | - print("Should have been redirect to " + options.should_redirect_to) |
| 52 | + print("Should have been redirected to " + options.should_redirect_to) |
53 | 53 | print("Instead was sent to " + document.location) |
54 | 54 | for(key in options) |
55 | 55 | { |
— | — | @@ -137,6 +137,9 @@ |
138 | 138 | // Android Tablet |
139 | 139 | shouldIgnore({user_agent: "Mozilla/5.0 (Linux; U; Android 2.2.1; en-us; device Build/FRG83) AppleWebKit/533.1 (KHTML, like Gecko) Version/4.0 Safari/533.1"}); |
140 | 140 | |
| 141 | + shouldIgnore({user_agent: "Mozilla/5.0 (compatible; MSIE 9.0; Windows NT 6.1; WOW64; Trident/5.0; SLCC2; Media Center PC 6.0; InfoPath.3; MS-RTC LM 8; Zune 4.7"}); |
| 142 | + shouldIgnore({user_agent: "Mozilla/5.0 (compatible; MSIE 9.0; Windows NT 6.1; Win64; x64; Trident/5.0"}) |
| 143 | + |
141 | 144 | // Fake test strings |
142 | 145 | |
143 | 146 | // Android, but only with Mobile |
Property changes on: branches/wmf/1.17wmf1/extensions/WikimediaMobile |
___________________________________________________________________ |
Modified: svn:mergeinfo |
144 | 147 | Merged /trunk/extensions/WikimediaMobile:r83114-83159 |