User:Yarl/vector.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.
// HotCat
var hotcat_use_category_links = false;
var hotcat_suggestions_fixed = true;

// Importy
importScript('User:Yarl/buttons.js');
importScript('User:Yarl/summarybuttons.js');
importScript('User:Yarl/edithysteria.js');
mw.loader.load('//pl.wikipedia.org/w/index.php?title=MediaWiki:Gadget-editform-ui-fixes.css&action=raw&ctype=text/css', 'text/css');

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

// Link na górze
$('<li><a href="/wiki/User:YarluBot">YarluBot</a> (<a href="/wiki/Special:Contributions/YarluBot">wkład</a>)</li>').insertAfter('#pt-userpage');

// Usuwajki
var AjaxDeleteExtraButtons = [
    {
        'label': 'Oznacz jako EK',
        'tag': '{\{speedy|1=%PARAMETER%}}',
        'img_summary': 'Tagging as speedy delete',
        'prompt_text': 'Powód:'
    },
    {
        'label': 'Oznacz jako duplikat',
        'tag': '{\{duplicate|1=File:%PARAMETER%}}',
        'img_summary': 'Tagging as duplicate of [[File:%PARAMETER%]]',
        'prompt_text': 'File:'
    },
    {
        'label': 'Oznacz jako watermark',
        'tag': '{\{Watermark}}',
        'img_summary': 'This file contains a watermark that should be removed.'
    },
    {
        'label': 'Oznacz jako LQ',
        'tag': '{\{low quality}}',
        'img_summary': 'This file has low quality'
    }
];