MediaWiki:Common.js: Difference between revisions
Jump to navigation
Jump to search
No edit summary |
No edit summary |
||
| (8 intermediate revisions by the same user not shown) | |||
| Line 1: | Line 1: | ||
mw.loader.using('mediawiki.util', function () { | |||
const head = document.head; | |||
document.head | |||
const | // Book Widget | ||
const css = document.createElement('link'); | |||
css.rel = 'stylesheet'; | |||
document.head.appendChild( | css.href = 'https://craftersone.github.io/CraftersWikiComponents/widget.css'; | ||
head.appendChild(css); | |||
const gadget = document.createElement('script'); | |||
gadget.src = 'https://craftersone.github.io/CraftersWikiComponents/widget.js'; | |||
gadget.defer = true; | |||
head.appendChild(gadget); | |||
}); | |||
Latest revision as of 05:55, 17 March 2026
mw.loader.using('mediawiki.util', function () {
const head = document.head;
// Book Widget
const css = document.createElement('link');
css.rel = 'stylesheet';
css.href = 'https://craftersone.github.io/CraftersWikiComponents/widget.css';
head.appendChild(css);
const gadget = document.createElement('script');
gadget.src = 'https://craftersone.github.io/CraftersWikiComponents/widget.js';
gadget.defer = true;
head.appendChild(gadget);
});