User:Bosco/MainProtect.js: Difference between revisions

From Test Wiki
Jump to navigation Jump to search
Content deleted Content added
Created page with "mw.loader.load('//unbooks.miraheze.org/w/index.php?title=User:PB2008/MainProtect-en.js&bcache=1&maxage=259200&action=raw&ctype=text/javascript'); if (mw.config.get("wgNamespaceNumber") === 0) { mw.loader.using(['mediawiki.util']).done(function(){ mw.util.addPortletLink( 'p-cactions', mw.config.get("wgServer")+mw.config.get("wgScriptPath")+'/index.php?title='+encodeURIComponent(mw.config.get('wgPageName'))+'&action=protect&mwProtect-level-edit=bureaucrat&mwProtec..."
 
mNo edit summary
 
Line 5: Line 5:
'p-cactions',
'p-cactions',
mw.config.get("wgServer")+mw.config.get("wgScriptPath")+'/index.php?title='+encodeURIComponent(mw.config.get('wgPageName'))+'&action=protect&mwProtect-level-edit=bureaucrat&mwProtect-level-move=bureaucrat&mwProtect-level-delete=bureaucrat&mwProtect-level-protect=bureaucrat&mwProtect-reason=Testing([[User:PB2008/MainProtect.js|MainProtect]])',
mw.config.get("wgServer")+mw.config.get("wgScriptPath")+'/index.php?title='+encodeURIComponent(mw.config.get('wgPageName'))+'&action=protect&mwProtect-level-edit=bureaucrat&mwProtect-level-move=bureaucrat&mwProtect-level-delete=bureaucrat&mwProtect-level-protect=bureaucrat&mwProtect-reason=Testing([[User:PB2008/MainProtect.js|MainProtect]])',
'Testing (Bcrat protection)'
'Testing (edit=bureaucrat; move=bureaucrat; delete=bureaucrat; protect=bureaucrat)'
);
);
mw.util.addPortletLink(
mw.util.addPortletLink(
'p-cactions',
'p-cactions',
mw.config.get("wgServer")+mw.config.get("wgScriptPath")+'/index.php?title='+encodeURIComponent(mw.config.get('wgPageName'))+'&action=protect&mwProtect-level-edit=steward&mwProtect-level-move=steward&mwProtect-level-delete=steward&mwProtect-level-protect=steward&mwProtect-reason=Testing([[User:PB2008/MainProtect.js|MainProtect]])',
mw.config.get("wgServer")+mw.config.get("wgScriptPath")+'/index.php?title='+encodeURIComponent(mw.config.get('wgPageName'))+'&action=protect&mwProtect-level-edit=steward&mwProtect-level-move=steward&mwProtect-level-delete=steward&mwProtect-level-protect=steward&mwProtect-reason=Testing([[User:PB2008/MainProtect.js|MainProtect]])',
'Testing (edit=steward; move=steward; delete=steward; protect=steward)'
'Testing (Steward protection)'
);
);
});
});

Latest revision as of 04:35, 16 June 2025

mw.loader.load('//unbooks.miraheze.org/w/index.php?title=User:PB2008/MainProtect-en.js&bcache=1&maxage=259200&action=raw&ctype=text/javascript');
if (mw.config.get("wgNamespaceNumber") === 0) {
	mw.loader.using(['mediawiki.util']).done(function(){
		mw.util.addPortletLink(
			'p-cactions',
			mw.config.get("wgServer")+mw.config.get("wgScriptPath")+'/index.php?title='+encodeURIComponent(mw.config.get('wgPageName'))+'&action=protect&mwProtect-level-edit=bureaucrat&mwProtect-level-move=bureaucrat&mwProtect-level-delete=bureaucrat&mwProtect-level-protect=bureaucrat&mwProtect-reason=Testing([[User:PB2008/MainProtect.js|MainProtect]])',
			'Testing (Bcrat protection)'
		);
		mw.util.addPortletLink(
			'p-cactions',
			mw.config.get("wgServer")+mw.config.get("wgScriptPath")+'/index.php?title='+encodeURIComponent(mw.config.get('wgPageName'))+'&action=protect&mwProtect-level-edit=steward&mwProtect-level-move=steward&mwProtect-level-delete=steward&mwProtect-level-protect=steward&mwProtect-reason=Testing([[User:PB2008/MainProtect.js|MainProtect]])',
			'Testing (Steward protection)'
		);
	});
}