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", "license-name": "AGPL",
"type": "other", "type": "other",
"AutoloadNamespaces": { "AutoloadNamespaces": {
"MediaWiki\\Extension\\BigBuffet\\": "includes/" "MediaWiki\\Extension\\BigBuffet\\": "src/"
}, },
"SpecialPages": { "SpecialPages": {
"BigBuffet": "MediaWiki\\Extension\\BigBuffet\\SpecialBigBuffet" "BigBuffet": "MediaWiki\\Extension\\BigBuffet\\SpecialBigBuffet"
@ -28,7 +28,7 @@
"description": "Route basename" "description": "Route basename"
}, },
"BigBuffetBaseUrl": { "BigBuffetBaseUrl": {
"value": "https://pleroma.woodynet.net/", "value": "https://fedi.bigbuff.et/",
"description": "Instance URL" "description": "Instance URL"
} }
}, },

View file

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