Jump to content

User:ZLEA/MMSLink.js

From Wikipedia, the free encyclopedia
Note: After saving, you have to bypass your browser's cache to see the changes. Google Chrome, Firefox, Microsoft Edge and Safari: Hold down the ⇧ Shift key and click the Reload toolbar button. For details and instructions about other browsers, see Wikipedia:Bypass your cache.
// MMSLink v1.2
// Install with:
// <code><nowiki>		{{subst:Iusc|User:ZLEA/MMSLink.js}}																	</nowiki></code>
// or with
// <code><nowiki>		importScript( 'User:ZLEA/MMSLink.js' ); // Backlink: [[User:ZLEA/MMSLink.js]] 			</nowiki></code> 
//
// This script is based on [[User:DannyS712/New pages feed.js]] by [[User:DannyS712]] and [[User:Danski454/ReviewWarn.js]] by [[User:Danski454]]
mw.loader.using( 'mediawiki.util' ).done( function() {
	if( mw.config.get( 'wgUserGroups' ) !== null &&
	( mw.config.get( 'wgUserGroups' ).indexOf('sysop') !== -1 || mw.config.get( 'wgUserGroups' ).indexOf('massmessage-sender') !== -1 )){
	mw.util.addPortletLink('p-interaction', mw.config.get( 'wgServer' ) + '/wiki/Special:MassMessage', 'Send mass message', 'n-mms', 'Send mass message');
	$( '#n-recentchanges' ).parent().append( $( '#n-mms' ) );
	}});