MediaWiki:Vector.js

From QME Wiki
Revision as of 14:54, 24 July 2025 by Admin (talk | contribs)
Jump to navigation Jump to search

Note: After publishing, you may have to bypass your browser's cache to see the changes.

  • Firefox / Safari: Hold Shift while clicking Reload, or press either Ctrl-F5 or Ctrl-R (⌘-R on a Mac)
  • Google Chrome: Press Ctrl-Shift-R (⌘-Shift-R on a Mac)
  • Edge: Hold Ctrl while clicking Refresh, or press Ctrl-F5.
/* All JavaScript here will be loaded for users of the Vector skin */

mw.loader.using('mediawiki.util', function () {
    if (mw.config.get('wgPageName') === 'main_page') {
        try {
            var script = document.createElement('script');
            script.setAttribute('data-name', 'BMC-Widget');
            script.setAttribute('data-cfasync', 'false');
            script.setAttribute('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', '#40DCA5');
            script.setAttribute('data-position', 'Right');
            script.setAttribute('data-x_margin', '18');
            script.setAttribute('data-y_margin', '18');
            document.body.appendChild(script);
        } catch (e) {
            console.warn("BMC widget failed to load:", e);
        }
    }
});
By using this site, you agree to the Terms of Use. © 1996–2025 The Quincy Examiner / MTB. All rights reserved.