User:Titodutta/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.
// [[:User:Steef389/js/bytechange.js]] in dewp
mw.loader.load('//de.wikipedia.org/w/index.php?title=Benutzer:Steef389/js/bytechange.js&action=raw&ctype=text/javascript');
 
importScript('User:Saibo/catgraphtabs.js'); // use tracking: [[User:Saibo/catgraphtabs.js]]
 
mw.loader.load("//commons.wikimedia.org/w/index.php?title=User:Saibo/CatNewsTabs.js&action=raw&ctype=text/javascript"); // use tracking: [[User:Saibo/CatNewsTabs.js]]
 
mw.util.addPortletLink('p-tb', 'javascript:importScript("MediaWiki:VisualFileChange.js");', 'Perform batch task', 't-AjaxQuickDeleteOnDemand');
 
var tab_SaiboAUT_lang = 'de'; // optional parameter; can be omitted
var tab_SaiboAUT_project = 'http://commons.wikimedia.org'; // optional parameter; can be omitted  
importScript('User:Saibo/afterUploadTab.js'); // use tracking (do not remove): [[User:Saibo/afterUploadTab.js]]
 
/* Ctrl-click to open search buttons in new tab */
 
$('#searchform, #search, #powersearch, #searchbox, .search-types, #search-types').bind('keyup keydown mousedown', 
  function (e){ $(this).attr('target', e.ctrlKey?'_blank':'') }) 
 
// nur das Diff-Modul von WikEd aktivieren.
mw.loader.load('//en.wikipedia.org/w/index.php?title=User:Cacycle/wikEdDiff.js&action=raw&ctype=text/javascript');
 
// MediaWiki_talk:AjaxQuickDelete.js
//To watch user pages, to which you add tags, set = true
var AjaxDeleteWatchUserTalk = true;
//To watch file pages, to which you add tags, set = true
var AjaxDeleteWatchFile = true;
 
 
var AjaxDeleteExtraButtons = [
                {
                    'label': 'no orig. src',
                    'tag': '{\{subst:dw-nsd}}',
                    'img_summary': '+Missing orig. source',
                    'talk_tag': '{\{subst:dw image source|1=%FILE%}}',
                    'talk_summary': 'Orig. source is missing for %FILE%',
                }, {
                    'label': 'No Perm. +Comment',
                    'tag': '<br /><br /><br />%PARAMETER% --~~\~~ {\{subst:npd}}',
                    'img_summary': '+Missing permission',
                    'talk_tag': '{\{subst:image permission|1=%FILE%}}',
                    'talk_summary': 'Please send a permission for %FILE% to [[COM:OTRS|OTRS]]',
                    'prompt_text': 'Additional comment (will be placed on top of the npd tag):',
                }, {
                    'label': 'Wrong lic. (but free)',
                    'tag': '{\{wrong license|%PARAMETER%}}',
                    'img_summary': '+Wrong licensing',
                    'talk_tag': '{\{subst:Wrong license note|%FILE%|Please see the file\'s page for more info.}}',
                    'talk_summary': 'Wrong licensing of %FILE%',
                    'prompt_text': 'Reason/explanation:',
                }, {
                    'label': 'speedy deletion',
                    'tag': '{\{speedy|1=%PARAMETER%}}',
                    'img_summary': 'Tagging for speedy deletion - reason: %PARAMETER%',
                    'prompt_text': 'Reason for speedy deletion:',
                }, {
                    'label': 'Mark as dupe',
                    'tag': '{\{duplicate|1=%PARAMETER%|user=%USER%}}',
                    'img_summary': 'Tagging as duplicate of [[File:%PARAMETER%]]',
                    'prompt_text': 'Which file is a duplicate of this file (filename without File: prefix)?',
                }
          ];
 
//vFCvFCCfg/////////////////////////////////////
/////// VISUAL FILE CHANGE CONFIGURATION ///////
///// DO NOT MODIFY BY HAND - FINGERS AWAY! ////
////////////////////////////////////////////////
window.vFCSettings = {"userNote":"Yours sincerely","testEdits":"0","firstTest":"0","defaultAction":"c_replace","watchUserTalk":true,"watchFiles":true,"loadBatchSize":"100","maxSimultaneousReq":"5"}; 
//////////////////////////////////vFCvFCCfgEnd//
window.HotCatAutoRemoveCheckCat = true;

//Crop tool
(function(mw, $){
    if (mw.config.get( 'wgNamespaceNumber' ) !== 6) return;
    if (mw.config.get( 'wgAction' ) != 'view') return;
 
    $( function () {
        var croplink = '//tools.wmflabs.org/croptool/?title=' + mw.config.get('wgTitle');
        mw.util.addPortletLink(
            "p-tb",
            croplink,
            "CropTool",
            "t-crop",
            "Crop this image"
        );
    });
})(mediaWiki, jQuery);