MediaWiki:Gadget-find-archived-section.js: Difference between revisions
Content deleted Content added
fix cases where exact matches weren't being obtained |
fix for MediaViewer URLs |
||
Line 12:
var sectionName = decodeURIComponent(window.___location.hash.slice(1)).replace(/_/g, ' ');
if (!sectionName ||
sectionName.indexOf('/media/') === 0 || // URLs used by MediaViewer
return;▼
document.getElementById(sectionName.replace(/ /g, '_')) !== null) { // section exists on page
▲ return;
}
$('#mw-content-text').before(
$('<div>')
'font-size': '90%',▼
.addClass('archived-section-prompt')
'padding-left': '20px'▼
▲ 'font-size': '90%',
▲ 'padding-left': '20px'
})
);
Line 49 ⟶ 54:
} else {
divHtml = 'Looks like the discussion "' + sectionName + '" has been archived. '
var discussionLink;
|