User:Bobogoobo/common.js: Difference between revisions
Jump to navigation
Jump to search
No edit summary |
(add purge link) |
||
Line 8: | Line 8: | ||
'</li>' | '</li>' | ||
); | ); | ||
//Add Purge to "More" box | |||
if (mw.config.get('wgArticleId') && mw.config.get('wgNamespaceNumber') !== '-1') { | |||
$('#p-cactions > ul').append( | |||
'<li id="ca-purge">' + | |||
'<a href="?action=purge">Purge</a>' + | |||
'</li>' | |||
); | |||
} | |||
}); | }); |
Revision as of 14:53, 2 July 2020
$(function() {
//Add PrefixIndex to toolbox
$('#p-tb li:nth-of-type(2)').after(
'<li id="t-prefixindex">' +
'<a href="/view/Special:PrefixIndex?prefix=&namespace=' +
mw.config.get('wgNamespaceNumber') +
'">Prefix Index</a>' +
'</li>'
);
//Add Purge to "More" box
if (mw.config.get('wgArticleId') && mw.config.get('wgNamespaceNumber') !== '-1') {
$('#p-cactions > ul').append(
'<li id="ca-purge">' +
'<a href="?action=purge">Purge</a>' +
'</li>'
);
}
});