Index: branches/wmf-deployment/extensions/UsabilityInitiative/js/plugins/jquery.wikiEditor.js |
— | — | @@ -84,11 +84,11 @@ |
85 | 85 | */ |
86 | 86 | 'isSupported': function( module ) { |
87 | 87 | // Fallback to the wikiEditor browser map if no special map is provided in the module |
88 | | - var mod = module && 'browsers' in module ? module : $.wikiEditor; |
89 | 88 | // 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; |
92 | 91 | } |
| 92 | + var mod = module && 'browsers' in module ? module : $.wikiEditor; |
93 | 93 | // Check for and make use of cached value and early opportunities to bail |
94 | 94 | if ( typeof mod.supported !== 'undefined' ) { |
95 | 95 | // Cache hit |
Index: branches/wmf-deployment/extensions/UsabilityInitiative/js/plugins.combined.js |
— | — | @@ -6627,11 +6627,11 @@ |
6628 | 6628 | */ |
6629 | 6629 | 'isSupported': function( module ) { |
6630 | 6630 | // Fallback to the wikiEditor browser map if no special map is provided in the module |
6631 | | - var mod = module && 'browsers' in module ? module : $.wikiEditor; |
6632 | 6631 | // 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; |
6635 | 6634 | } |
| 6635 | + var mod = module && 'browsers' in module ? module : $.wikiEditor; |
6636 | 6636 | // Check for and make use of cached value and early opportunities to bail |
6637 | 6637 | if ( typeof mod.supported !== 'undefined' ) { |
6638 | 6638 | // Cache hit |
Index: branches/wmf-deployment/extensions/UsabilityInitiative/js/plugins.combined.min.js |
— | — | @@ -443,8 +443,8 @@ |
444 | 444 | options.endContainer=options.startContainer;break;case'scrollToCaretPosition':options=$.extend({'force':false},options);break;} |
445 | 445 | 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;} |
446 | 446 | 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;} |
449 | 449 | if(!($.browser.name in mod.browsers[$('body').is('.rtl')?'rtl':'ltr'])){return mod.supported=true;} |
450 | 450 | var browser=mod.browsers[$('body').is('.rtl')?'rtl':'ltr'][$.browser.name];if(typeof browser!='object'){return mod.supported=false;} |
451 | 451 | 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;}}} |