Compare commits

...

5 commits

Author SHA1 Message Date
bdd216b6d7 update default config
Signed-off-by: marcin mikołajczak <git@mkljczk.pl>
2024-11-25 23:55:11 +01:00
3352548b50 cleanup
Signed-off-by: marcin mikołajczak <git@mkljczk.pl>
2024-11-25 23:43:49 +01:00
1076ab8796 Update import path
Signed-off-by: marcin mikołajczak <git@mkljczk.pl>
2024-11-25 15:08:50 +01:00
bb531c1227 Update default config
Signed-off-by: marcin mikołajczak <git@mkljczk.pl>
2024-10-24 17:12:52 +02:00
299cfab019 Update embed
Signed-off-by: marcin mikołajczak <git@mkljczk.pl>
2024-10-24 17:12:32 +02:00
2 changed files with 17 additions and 18 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"
@ -28,7 +28,7 @@
"description": "Route basename"
},
"BigBuffetBaseUrl": {
"value": "https://pleroma.woodynet.net/",
"value": "https://fedi.bigbuff.et/",
"description": "Instance URL"
}
},

View file

@ -21,21 +21,20 @@ class SpecialBigBuffet extends \SpecialPage
$basename = $config->get('BigBuffetBasename');
$baseurl = $config->get('BigBuffetBaseUrl');
$wikitext = '
<script defer="defer" src="/bigbuffet/js/common.js"></script>
<script defer="defer" src="/bigbuffet/js/application.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"],
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);
}
}