User:Kaliforniyka/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 can be added at User:Kaliforniyka/common.css. |
// <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]], fixed also now for admins)
importScript('User:Perhelion/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>
//vFCvFCCfg/////////////////////////////////////
/////// VISUAL FILE CHANGE CONFIGURATION ///////
///// DO NOT MODIFY BY HAND - FINGERS AWAY! ////
////////////////////////////////////////////////
window.vFCSettings = {"userNote":"Yours sincerely,","firstTest":0,"testEdits":0,"defaultAction":"c_replace","watchlistUserTalk":"preferences","watchlistFiles":"preferences","watchlistReplace":"nochange","watchlistOTRS":"nochange","loadBatchSize":100,"maxSimultaneousReq":5,"summaryChacheLen":5,"loadThumbs":true,"loadWikitext":true};
//////////////////////////////////vFCvFCCfgEnd//
//</nowiki>
importScript('User:Kanonkas/twinkle.js');
// [[File:User:Perhelion/simpleSVGcheck.js]] (workaround for [[phab:T35355]])
if( mw.config.get('wgNamespaceNumber') === 6 && /SVG/i.test( mw.config.get('wgTitle').slice( -3 ) ) )
importScript('User:Perhelion/simpleSVGcheck.js');