MediaWiki:Gadget-ImageAnnotator.js: Difference between revisions
Content deleted Content added
Follow-up Special:Diff/127917228: Fix typo "sh" -> "h" |
Remove redundant " || null" from namespaceCheck calls. Falsey values are fine, and the function in question checks for falseyness not null |
||
Line 1,474:
if ( !self.haveAjax
|| !config.generalImagesEnabled()
|| namespaceCheck(window.ImageAnnotator_no_images
) {
self.rules.inline.show = false;
Line 1,482:
if ( !self.haveAjax
|| !config.thumbsEnabled()
|| namespaceCheck(window.ImageAnnotator_no_thumbs
) {
self.rules.thumbs.show = false;
Line 1,489:
self.rules.shared.show = true;
else if ( !config.sharedImagesEnabled()
|| namespaceCheck(window.ImageAnnotator_no_shared
) {
self.rules.shared.show = false;
}
if (namespaceCheck(window.ImageAnnotator_icon_images
self.rules.inline.icon = true;
if (namespaceCheck(window.ImageAnnotator_icon_thumbs
self.rules.thumbs.icon = true;
}
// User rule for displaying captions on images in articles
self.hideCaptions = namespaceCheck(window.ImageAnnotator_hide_captions
var do_images = typeof self.rules.inline.show === 'undefined' || self.rules.inline.show;
|