User:JoKalliauer/common.js
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.
The accompanying .css page for this skin is at User:JoKalliauer/common.css. |
mw.loader.load('ext.gadget.DelReqHandler');
// <nowiki>
var ns = mw.config.get('wgNamespaceNumber'),
ti = mw.config.get('wgTitle');
$.when(mw.loader.using(['mediawiki.util']), $.ready).done(function () {
if ( ns === 6 ) { // Files only
if (/SVG/i.test(ti.slice(-3))) { // SVG
// SVG edit
importScript('User:Rillke/SVGedit.js');
// W3C-Validator for SVG (with ss)
mw.util.addPortletLink('p-cactions', 'http://validator.w3.org/check?uri='+'https://commons.wikimedia.org'+mw.util.getUrl('Special:Filepath/'+ti)+'&ss=1#source', 'Valid SVG?', 't-validSVG', 'W3C-Validator', null);
// W3C-Validator check-link (without ss) for every SVG (by [[User:Perhelion]] and [[User:Sarang]], fixed also now for admins)
importScript('User:Sarang/simpleSVGcheck.js');
$('#wpTextbox1').wikiEditor('addToToolbar', {
'section' : 'main',
'group' : 'insert',
'tools' : {
'File-size' : {
label : 'Size',
type : 'button',
icon : '//upload.wikimedia.org/wikipedia/commons/7/7d/Button_clipboard_Flink.png',
action : {
type : 'encapsulate',
options : {
pre : '{{subst:#invoke:File|size|file='+ mw.config.get('wgTitle'),
post : '}}',
peri : ''
}
}
}
}
});
}
// JustReplace [[User:Sreejithk2000/JustReplace.js]] -- Commons:GlobalReplace instead
importScript('User:Perhelion/JustReplace+.js');
// File desc. cleanup
importScript('User:Magog the Ogre/cleanup.js');
}
});
//</nowiki>
// importScript("User:Whym/lockrollback.js"); //revert
//https://en.wikipedia.org/wiki/User:Joeytje50/JWB#Installation
mw.loader.load('//en.wikipedia.org/w/index.php?title=User:Joeytje50/JWB.js/load.js&action=raw&ctype=text/javascript');