r64216 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r64215‎ | r64216 | r64217 >
Date:13:13, 26 March 2010
Author:catrope
Status:deferred
Tags:
Comment:
wmf-deployment: Fix UsabilityInitiative live hack for real this time
Modified paths:
  • /branches/wmf-deployment/extensions/UsabilityInitiative/js/plugins.combined.js (modified) (history)
  • /branches/wmf-deployment/extensions/UsabilityInitiative/js/plugins.combined.min.js (modified) (history)
  • /branches/wmf-deployment/extensions/UsabilityInitiative/js/plugins/jquery.wikiEditor.js (modified) (history)

Diff [purge]

Index: branches/wmf-deployment/extensions/UsabilityInitiative/js/plugins/jquery.wikiEditor.js
@@ -84,11 +84,11 @@
8585 */
8686 'isSupported': function( module ) {
8787 // Fallback to the wikiEditor browser map if no special map is provided in the module
88 - var mod = module && 'browsers' in module ? module : $.wikiEditor;
8988 // HORRIBLE LIVE HACK
90 - if ( typeof mod.name != 'undefined' && ( mod.name == 'toc' || mod.name == 'highlight' ) && typeof wgReallyGiveMeTOC == 'undefined' ) {
91 - return mod.supported = false;
 89+ if ( module && typeof module.name != 'undefined' && ( module.name == 'toc' || module.name == 'highlight' ) && typeof wgReallyGiveMeTOC == 'undefined' ) {
 90+ return module.supported = false;
9291 }
 92+ var mod = module && 'browsers' in module ? module : $.wikiEditor;
9393 // Check for and make use of cached value and early opportunities to bail
9494 if ( typeof mod.supported !== 'undefined' ) {
9595 // Cache hit
Index: branches/wmf-deployment/extensions/UsabilityInitiative/js/plugins.combined.js
@@ -6627,11 +6627,11 @@
66286628 */
66296629 'isSupported': function( module ) {
66306630 // Fallback to the wikiEditor browser map if no special map is provided in the module
6631 - var mod = module && 'browsers' in module ? module : $.wikiEditor;
66326631 // HORRIBLE LIVE HACK
6633 - if ( typeof mod.name != 'undefined' && ( mod.name == 'toc' || mod.name == 'highlight' ) && typeof wgReallyGiveMeTOC == 'undefined' ) {
6634 - return mod.supported = false;
 6632+ if ( module && typeof module.name != 'undefined' && ( module.name == 'toc' || module.name == 'highlight' ) && typeof wgReallyGiveMeTOC == 'undefined' ) {
 6633+ return module.supported = false;
66356634 }
 6635+ var mod = module && 'browsers' in module ? module : $.wikiEditor;
66366636 // Check for and make use of cached value and early opportunities to bail
66376637 if ( typeof mod.supported !== 'undefined' ) {
66386638 // Cache hit
Index: branches/wmf-deployment/extensions/UsabilityInitiative/js/plugins.combined.min.js
@@ -443,8 +443,8 @@
444444 options.endContainer=options.startContainer;break;case'scrollToCaretPosition':options=$.extend({'force':false},options);break;}
445445 var context=$(this).data('wikiEditor-context');var hasIframe=context!==undefined&&context.$iframe!==undefined;var needSave=false;if(hasIframe&&context.savedSelection!==null){context.fn.restoreSelection();needSave=true;}
446446 retval=(hasIframe?context.fn:fn)[command].call(this,options);if(hasIframe&&needSave){context.fn.saveSelection();}
447 -return retval;};})(jQuery);(function($){$.wikiEditor={'modules':{},'instances':[],'browsers':{'ltr':{'msie':[['>=',7]],'firefox':[['>=',2]],'opera':[['>=',9.6]],'safari':[['>=',3]],'chrome':[['>=',3]],'blackberry':false,'ipod':false,'iphone':false},'rtl':{'msie':[['>=',8]],'firefox':[['>=',2]],'opera':[['>=',9.6]],'safari':[['>=',3]],'chrome':[['>=',3]],'blackberry':false,'ipod':false,'iphone':false}},'imgPath':wgScriptPath+'/extensions/UsabilityInitiative/images/wikiEditor/','isSupported':function(module){var mod=module&&'browsers'in module?module:$.wikiEditor;if(typeof mod.name!='undefined'&&(mod.name=='toc'||mod.name=='highlight')&&typeof wgReallyGiveMeTOC=='undefined'){return mod.supported=false;}
448 -if(typeof mod.supported!=='undefined'){return mod.supported;}
 447+return retval;};})(jQuery);(function($){$.wikiEditor={'modules':{},'instances':[],'browsers':{'ltr':{'msie':[['>=',7]],'firefox':[['>=',2]],'opera':[['>=',9.6]],'safari':[['>=',3]],'chrome':[['>=',3]],'blackberry':false,'ipod':false,'iphone':false},'rtl':{'msie':[['>=',8]],'firefox':[['>=',2]],'opera':[['>=',9.6]],'safari':[['>=',3]],'chrome':[['>=',3]],'blackberry':false,'ipod':false,'iphone':false}},'imgPath':wgScriptPath+'/extensions/UsabilityInitiative/images/wikiEditor/','isSupported':function(module){if(module&&typeof module.name!='undefined'&&(module.name=='toc'||module.name=='highlight')&&typeof wgReallyGiveMeTOC=='undefined'){return module.supported=false;}
 448+var mod=module&&'browsers'in module?module:$.wikiEditor;if(typeof mod.supported!=='undefined'){return mod.supported;}
449449 if(!($.browser.name in mod.browsers[$('body').is('.rtl')?'rtl':'ltr'])){return mod.supported=true;}
450450 var browser=mod.browsers[$('body').is('.rtl')?'rtl':'ltr'][$.browser.name];if(typeof browser!='object'){return mod.supported=false;}
451451 for(var condition in browser){var op=browser[condition][0];var val=browser[condition][1];if(val===false){return mod.supported=false;}else if(typeof val=='string'){if(!(eval('$.browser.version'+op+'"'+val+'"'))){return mod.supported=false;}}else if(typeof val=='number'){if(!(eval('$.browser.versionNumber'+op+val))){return mod.supported=false;}}}

Status & tagging log