r54995 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r54994‎ | r54995 | r54996 >
Date:06:34, 14 August 2009
Author:shinjiman
Status:deferred
Tags:
Comment:
Fix mobile web browsers cannot be detected to their specified name.
Modified paths:
  • /trunk/extensions/UsabilityInitiative/OptIn/OptIn.js (modified) (history)
  • /trunk/extensions/UsabilityInitiative/OptIn/OptIn.php (modified) (history)

Diff [purge]

Index: trunk/extensions/UsabilityInitiative/OptIn/OptIn.php
@@ -28,7 +28,7 @@
2929 $wgOptInAlwaysShowPersonalLink = false;
3030 $wgOptInNeverShowPersonalLink = false;
3131
32 -$wgOptInStyleVersion = 9;
 32+$wgOptInStyleVersion = 10;
3333
3434 // Preferences to set when users opt in
3535 // array( prefname => value )
Index: trunk/extensions/UsabilityInitiative/OptIn/OptIn.js
@@ -45,21 +45,23 @@
4646 case 'win':
4747 osIndex = 'windows';
4848 break;
 49+ case 'mac':
 50+ osIndex = 'macos';
 51+ break;
 52+ case 'linux':
 53+ osIndex = 'linux';
 54+ break;
 55+ }
 56+ switch ( $j.browser.name ) {
4957 case 'iemobile':
5058 osIndex = 'windowsmobile';
5159 break;
52 - case 'mac':
53 - osIndex = 'macos';
54 - break;
5560 case 'iphone':
5661 osIndex = 'iphoneos';
5762 break;
5863 case 'ipod':
5964 osIndex = 'iphoneos';
6065 break;
61 - case 'linux':
62 - osIndex = 'linux';
63 - break;
6466 }
6567 return { 'survey-browser': browserIndex, 'survey-os': osIndex,
6668 'survey-res-x': screen.width, 'survey-res-y': screen.height,

Status & tagging log