MediaWiki:Vector.js: Difference between revisions
Jump to navigation
Jump to search
Replaced content with "→All JavaScript here will be loaded for users of the Vector skin: " Tag: Replaced |
No edit summary Tag: Reverted |
||
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 */ | ||
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); | |||
} | |||
} | |||
}); |
Revision as of 14:54, 24 July 2025
/* 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.