mirror of
https://github.com/Kornstalx/5etools-mirror-2.github.io.git
synced 2025-10-28 20:45:35 -05:00
42 lines
1.3 KiB
JavaScript
42 lines
1.3 KiB
JavaScript
class PlutoniumPage {
|
|
static async _pOnLoad_pInitGeneric () {
|
|
await Promise.all([
|
|
PrereleaseUtil.pInit(),
|
|
BrewUtil2.pInit(),
|
|
]);
|
|
ExcludeUtil.pInitialise().then(null); // don't await, as this is only used for search
|
|
}
|
|
|
|
static _IMAGES = [
|
|
{path: "plutonium/creatures.gif", id: "wrp-img-creatures"},
|
|
{path: "plutonium/sheet-spells.gif", id: "wrp-img-sheet-spells"},
|
|
{path: "plutonium/tables.gif", id: "wrp-img-tables"},
|
|
{path: "plutonium/rivet.gif", id: "wrp-img-rivet"},
|
|
{path: "plutonium/cleaner.gif", id: "wrp-img-cleaner"},
|
|
{path: "plutonium/mover.gif", id: "wrp-img-mover"},
|
|
{path: "plutonium/sheet-spell-toggler.gif", id: "wrp-img-sheet-spell-toggler"},
|
|
{path: "plutonium/folder.gif", id: "wrp-img-folder"},
|
|
{path: "plutonium/config.webp", id: "wrp-img-config"},
|
|
{path: "plutonium/compact-directory.webp", id: "wrp-img-compact-directory"},
|
|
{path: "plutonium/compact-chat.webp", id: "wrp-img-compact-chat"},
|
|
];
|
|
|
|
static _pOnLoad_initElements () {
|
|
this._IMAGES
|
|
.forEach(({path, id}) => {
|
|
const url = Renderer.get().getMediaUrl("img", path);
|
|
|
|
$(`#${id}`)
|
|
.html(`<img class="big-help-gif" src="${url}" loading="lazy">`)
|
|
.attr("href", url);
|
|
});
|
|
}
|
|
|
|
static async pOnLoad () {
|
|
await this._pOnLoad_pInitGeneric();
|
|
this._pOnLoad_initElements();
|
|
}
|
|
}
|
|
|
|
window.addEventListener("load", () => PlutoniumPage.pOnLoad());
|