MediaWiki:Common.js: Difference between revisions

From CHITRAL
Created page with "→‎Any JavaScript here will be loaded for all users on every page load.: mw.loader.using('ext.wikiEditor.toolbar', function () { $(document).ready(function () { if ($('#wpUploadFile').length === 0) { $('#toolbar').append( $('<a>') .attr('href', mw.util.getUrl('Special:Upload')) .text('Upload Media') .css({ padding: '5px', 'background-color': '#ccc', 'border-radius': '5px..."
 
No edit summary
 
Line 1: Line 1:
/* Any JavaScript here will be loaded for all users on every page load. */
/* Any JavaScript here will be loaded for all users on every page load. */
mw.loader.using('ext.wikiEditor.toolbar', function () {
    $(document).ready(function () {
        if ($('#wpUploadFile').length === 0) {
            $('#toolbar').append(
                $('<a>')
                    .attr('href', mw.util.getUrl('Special:Upload'))
                    .text('Upload Media')
                    .css({ padding: '5px', 'background-color': '#ccc', 'border-radius': '5px' })
            );
        }
    });
});

Latest revision as of 15:04, 16 January 2025

/* Any JavaScript here will be loaded for all users on every page load. */