Jump to content

User:DanCherek/UserLogPatrol.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.
// Written by [[User:DannyS712]]
mw.loader.using( 'mediawiki.util', function () {
    $(document).ready( function () {
    	if ( mw.config.get('wgCanonicalNamespace') === 'Special' && mw.config.get('wgCanonicalSpecialPageName') === 'Log' ){
	    	mw.util.addPortletLink ( 'p-cactions', 'javascript:void(0)', 'Hide', 'ca-hideStuff', 'hide', "'");
	    	$('#ca-hideStuff').on('click', function() {
	        	$('li.mw-logline-newusers:has(a.mw-usertoollinks-contribs-no-edits)').hide();
	    	} );
    	}
    } );
} );