User:Bobogoobo/common.js: Difference between revisions

From NPOWiki
Jump to navigation Jump to search
(add purge link)
(element changes)
Line 11: Line 11:
//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 > ul').append(
$('#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">Purge</a>' +
'</li>'
'</li>'

Revision as of 00:11, 6 July 2022

$(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 .vector-menu-content-list').append(
			'<li id="ca-purge" class="mw-list-item">' +
				'<a href="?action=purge">Purge</a>' +
			'</li>'
		);
	}
});