MediaWiki:Vector.js: Difference between revisions

From QME Wiki
Jump to navigation Jump to search
No edit summary
Tags: Replaced Manual revert
 
(11 intermediate revisions by the same user not shown)
Line 1: Line 1:
/* All JavaScript here will be loaded for users of the Vector skin */
/* All JavaScript here will be loaded for users of the Vector skin */
// Load Buy Me a Coffee widget only on the Main Page
mw.loader.using('mediawiki.util', function () {
    if (mw.config.get('wgPageName') === 'Main_Page') {
        var script = document.createElement('script');
        script.setAttribute('data-name', 'BMC-Widget');
        script.setAttribute('data-cfasync', 'false');
        script.src = 'https://cdnjs.buymeacoffee.com/1.0.0/widget.prod.min.js';
        script.setAttribute('data-id', 'quincyexaminer');
        script.setAttribute('data-description', 'Support me on Buy me a coffee!');
        script.setAttribute('data-message', '');
        script.setAttribute('data-color', '#79D6B5');
        script.setAttribute('data-position', 'Right');
        script.setAttribute('data-x_margin', '18');
        script.setAttribute('data-y_margin', '18');
        document.body.appendChild(script);
        console.log("Buy Me a Coffee widget script injected");
    }
});

Latest revision as of 16:22, 7 August 2025

/* All JavaScript here will be loaded for users of the Vector skin */
By using this site, you agree to the Terms of Use. © 1996–2025 The Quincy Examiner / MTB. All rights reserved.