User:Bobogoobo/common.js: Difference between revisions
Jump to navigation
Jump to search
add purge link |
No edit summary |
||
| (2 intermediate revisions by the same user not shown) | |||
| Line 1: | Line 1: | ||
$(function() { | $(function() { | ||
//Add Purge to "More" box | //Add Purge to "More" box | ||
if (mw.config.get('wgArticleId') && mw.config.get('wgNamespaceNumber') !== '-1') { | if (mw.config.get('wgArticleId') && mw.config.get('wgNamespaceNumber') !== '-1') { | ||
$('#p-cactions | $('#p-cactions .vector-menu-content-list').append( | ||
'<li id="ca-purge">' + | '<li id="ca-purge" class="mw-list-item">' + | ||
'<a href="?action=purge">Purge</a>' + | '<a href="?action=purge"><span>Purge</span></a>' + | ||
'</li>' | '</li>' | ||
); | ); | ||
} | } | ||
//Default Prefix Index link to search current namespace | |||
$('#n-Prefix-Index a').attr('href', $('#n-Prefix-Index a').attr('href') + '?namespace=' + mw.config.get('wgNamespaceNumber')); | |||
}); | }); | ||
Latest revision as of 10:46, 2 September 2025
$(function() {
//Add Purge to "More" box
if (mw.config.get('wgArticleId') && mw.config.get('wgNamespaceNumber') !== '-1') {
$('#p-cactions .vector-menu-content-list').append(
'<li id="ca-purge" class="mw-list-item">' +
'<a href="?action=purge"><span>Purge</span></a>' +
'</li>'
);
}
//Default Prefix Index link to search current namespace
$('#n-Prefix-Index a').attr('href', $('#n-Prefix-Index a').attr('href') + '?namespace=' + mw.config.get('wgNamespaceNumber'));
});