Signed-off-by: marcin mikołajczak <git@mkljczk.pl>
This commit is contained in:
marcin mikołajczak 2024-11-25 23:43:49 +01:00
parent 1076ab8796
commit 3352548b50
2 changed files with 16 additions and 16 deletions

View file

@ -7,7 +7,7 @@
"license-name": "AGPL",
"type": "other",
"AutoloadNamespaces": {
"MediaWiki\\Extension\\BigBuffet\\": "includes/"
"MediaWiki\\Extension\\BigBuffet\\": "src/"
},
"SpecialPages": {
"BigBuffet": "MediaWiki\\Extension\\BigBuffet\\SpecialBigBuffet"

View file

@ -21,20 +21,20 @@ class SpecialBigBuffet extends \SpecialPage
$basename = $config->get('BigBuffetBasename');
$baseurl = $config->get('BigBuffetBaseUrl');
$wikitext = '
<script defer="defer" src="/extensions/BigBuffet/script/index.js"></script>
<div id="bigbuffet" class="text-base"></div>
<script>
window.BIG_BUFFET_CONFIG = {
basename:' . json_encode($basename) . ',
baseUrl:' . json_encode($baseurl) . ',
mountPoint: "bigbuffet",
styles: ["default", "generated"],
icons: {},
locale:' . json_encode($locale) . '
};
</script>
';
$output->addHTML($wikitext);
$html = '
<script defer="defer" src="/extensions/BigBuffet/resources/index.js"></script>
<div id="bigbuffet" class="text-base"></div>
<script>
window.BIG_BUFFET_CONFIG = {
basename: ' . json_encode($basename) . ',
baseUrl: ' . json_encode($baseurl) . ',
mountPoint: "bigbuffet",
styles: ["default", "generated"],
icons: {},
locale: ' . json_encode($locale) . '
};
</script>
';
$output->addHTML($html);
}
}