Index: trunk/extensions/WikimediaMobile/WikimediaMobile.php |
— | — | @@ -24,9 +24,8 @@ |
25 | 25 | /** |
26 | 26 | * The base URL of the mobile gateway |
27 | 27 | */ |
28 | | -$wgWikimediaMobileUrl = 'http://en.m.wikipedia.org/wiki'; |
| 28 | +$wgWikimediaMobileUrl = '.m.wikipedia.org'; |
29 | 29 | |
30 | | - |
31 | 30 | $wgHooks['BeforePageDisplay'][] = 'wfWikimediaMobileAddJs'; |
32 | 31 | $wgHooks['MakeGlobalVariablesScript'][] = 'wfWikimediaMobileVars'; |
33 | 32 | |
Index: trunk/extensions/WikimediaMobile/MobileRedirect.js |
— | — | @@ -15,13 +15,10 @@ |
16 | 16 | |
17 | 17 | function getMobileUrl() { |
18 | 18 | var mainPage = wgMainPageTitle.replace(/ /g, '_'); |
19 | | - var url = wgWikimediaMobileUrl + '/'; |
20 | | - if (wgPageName == mainPage) { |
21 | | - url += '::Home'; // Special case |
22 | | - } else { |
23 | | - url += encodeURIComponent(wgPageName).replace('%2F','/').replace('%3A',':'); |
| 19 | + var url = 'http://' + wgContentLanguage + ".m.wikipedia.org/"; |
| 20 | + if (wgPageName != mainPage) { |
| 21 | + url += "wiki/" + encodeURIComponent(wgPageName).replace('%2F','/').replace('%3A',':'); |
24 | 22 | } |
25 | | - url += '?wasRedirected=true'; |
26 | 23 | return url; |
27 | 24 | } |
28 | 25 | |