User:TheMcr/monobook.js: Difference between revisions

Boobpedia - Encyclopedia of big boobs
Jump to navigationJump to search
(my monobook)
 
(Blanked the page)
Tag: Blanking
 
(17 intermediate revisions by the same user not shown)
Line 1: Line 1:


console.log("Custom JavaScript loaded!");
mw.loader.using('ext.wikiEditor').then(function() {
    if ($('#wpTextbox1').length) {
        $('#wpTextbox1').wikiEditor('addToToolbar', {
            section: 'main',
            group: 'format',
            tools: {
                customButton: {
                    label: 'Insert Hello World',
                    type: 'button',
                    icon: '//upload.wikimedia.org/wikipedia/commons/6/64/Icon_example.svg',
                    action: {
                        type: 'replace',
                        options: {
                            pre: 'Hello, world!',
                        }
                    }
                }
            }
        });
    }
});
$(document).ready(function() {
    $("table.sortable").each(function() {
        mw.libs.sorttable.makeSortable(this);
    });
});
if (mw.config.get('wgPageName') === 'Main_Page') {
    alert('Welcome to the Main Page!');
}

Latest revision as of 15:17, 5 April 2025