User:DannyS712/common.js

From Wikimedia Commons, the free media repository
Jump to navigation Jump to search
Note: After saving, you have to bypass your browser's cache to see the changes. Internet Explorer: press Ctrl-F5, Mozilla: hold down Shift while clicking Reload (or press Ctrl-Shift-R), Opera/Konqueror: press F5, Safari: hold down Shift + Alt while clicking Reload, Chrome: hold down Shift while clicking Reload.
//<nowiki>

//vFCvFCCfg/////////////////////////////////////
/////// VISUAL FILE CHANGE CONFIGURATION ///////
///// DO NOT MODIFY BY HAND - FINGERS AWAY! ////
////////////////////////////////////////////////
window.vFCSettings = {"userNote":"Thanks,","firstTest":0,"testEdits":0,"defaultAction":"del","watchlistUserTalk":"watch","watchlistFiles":"watch","watchlistReplace":"nochange","watchlistOTRS":"nochange","loadBatchSize":50,"maxSimultaneousReq":50,"summaryChacheLen":5,"loadThumbs":true,"loadWikitext":true};
//////////////////////////////////vFCvFCCfgEnd//
//</nowiki>

window.checkSiteUsage = function( file, site, limit, threshold ){
	var getter = {
        action: 'query',
        prop: 'globalusage',
        gulimit: limit,
		guprop: 'pageid',
        titles: file
    };
    if ( site && site !== '' ) {
    	getter.gusite = site;
    }
    new mw.Api().get( getter ).done( function ( response ) {
		var filePage = response.query.pages[ Object.keys( response.query.pages)[0] ];
		if ( filePage.globalusage.length > threshold ) {
	        console.log( filePage.globalusage.length, filePage.title );
			return true;
        }
        return false;
    } );
};

importScript('User:Perhelion/justReplace.js');
//<nowiki>

//catALot///////////////////////////////////////
////////// Cat-a-lot user preferences //////////
window.catALotPrefs = {"disambig_category":"Disambiguation","redir_category":"Category redirects","watchlist":"nochange","minor":true,"editpages":true,"docleanup":false,"subcatcount":50,"uncat":true,"button":true};
////////////////////////////////////catALotEnd//
//</nowiki>