User:Samwilson/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.
//mw.loader.load( 'https://fr.wikipedia.org/w/index.php?title=MediaWiki:Gadget-WhereWikimediansLive.css&action=raw&ctype=text/css', 'text/css' );
//mw.loader.load( 'https://fr.wikipedia.org/w/index.php?title=MediaWiki:Gadget-WhereWikimediansLive.js&action=raw&ctype=text/javascript' );

//mw.loader.load( 'https://commons.wikimedia.org/w/index.php?title=User:Samwilson/GoogleOCR.js&action=raw&ctype=text/javascript' );
//mw.loader.load( 'https://commons.wikimedia.org/w/index.php?title=User:Samwilson/GoogleOCR_sandbox.js&action=raw&ctype=text/javascript' );
mw.loader.load( 'https://commons.wikimedia.org/w/index.php?title=User:Samwilson/PreviewWhileEditing.js&action=raw&ctype=text/javascript' );

// mw.loader.load( 'https://commons.wikimedia.org/w/index.php?title=User:Samwilson/Searchnotincat.js&action=raw&ctype=text/javascript' );

window.catALotPrefs = {
	"disambig_category":"Disambiguation","redir_category":"Category redirects","watchlist":"preferences","minor":false,
	"editpages":false,"docleanup":false,"subcatcount":50,"uncat":true,"button":false
};

if ( mw.config.get('wgCanonicalNamespace') === 'Category' ) {
	var title = mw.config.get( 'wgTitle' );
    mw.util.addPortletLink(
    	'p-cactions', 
		'/wiki/Special:UploadWizard?categories=' + encodeURIComponent( title ),
		'Upload to: ' + title,
		'ca-upload-here', 
		"Upload to the '" + title + "' category",
		null
	);
}