1
0
mirror of https://github.com/koloml/furbooru-tagging-assistant.git synced 2026-03-24 23:02:58 +00:00

Preparing extension for Tantabus

This commit is contained in:
2026-02-22 01:19:14 +04:00
parent 03b0763db4
commit d181509d6f
6 changed files with 60 additions and 8 deletions

View File

@@ -67,13 +67,24 @@ export async function packExtension(settings) {
return entry;
})
if (process.env.SITE === 'derpibooru') {
manifest.replaceHostTo([
'derpibooru.org',
'trixiebooru.org'
]);
manifest.replaceBooruNameWith('Derpibooru');
manifest.setGeckoIdentifier('derpibooru-tagging-assistant@thecore.city');
switch (process.env.SITE) {
case 'derpibooru':
manifest.replaceHostTo([
'derpibooru.org',
'trixiebooru.org'
]);
manifest.replaceBooruNameWith('Derpibooru');
manifest.setGeckoIdentifier('derpibooru-tagging-assistant@thecore.city');
break;
case 'tantabus':
manifest.replaceHostTo('tantabus.ai');
manifest.replaceBooruNameWith('Tantabus');
manifest.setGeckoIdentifier('tantabus-tagging-assistant@thecore.city');
break;
default:
console.warn('No replacement set up for site: ' + process.env.SITE);
}
manifest.passVersionFromPackage(path.resolve(settings.rootDir, 'package.json'));

View File

@@ -5,6 +5,7 @@
"scripts": {
"build": "npm run build:popup && npm run build:extension",
"build:derpibooru": "cross-env SITE=derpibooru npm run build",
"build:tantabus": "cross-env SITE=tantabus npm run build",
"build:popup": "vite build",
"build:extension": "node build-extension.js",
"check": "svelte-kit sync && svelte-check --tsconfig ./tsconfig.json",

View File

@@ -11,6 +11,10 @@
if (__CURRENT_SITE__ === 'derpibooru') {
currentSiteUrl = 'https://derpibooru.org';
}
if (__CURRENT_SITE__ === 'tantabus') {
currentSiteUrl = 'https://tantabus.ai';
}
</script>
<Menu>

View File

@@ -95,3 +95,31 @@ $warning-border: #95562c;
$input-background: #282e39;
$input-border: #575e6b;
}
@if environment.$current-site == 'tantabus' {
$background: #221117;
$text: #e0e0e0;
$text-gray: #bb90a6;
$link: #ee157a;
$link-hover: #b099dd;
$header: #811242;
$header-toolbar: #501e36;
$header-hover-background: #5d0d30;
$header-mobile-link-hover: #995470;
$footer: #2f1d26;
$footer-text: $text-gray;
$block-header: $header-toolbar;
$block-border: $header-toolbar;
$block-background: #2f1d26;
$block-background-alternate: #26171e;
$media-box-border: #573142;
$input-background: #392833;
$input-border: #6b5764;
}

View File

@@ -9,7 +9,7 @@
padding: 0 4px;
display: flex;
@if environment.$current-site == 'derpibooru' {
@if environment.$current-site == 'derpibooru' or environment.$current-site == 'tantabus' {
border: 1px solid colors.$tag-border;
line-height: 24px;
}

View File

@@ -20,6 +20,14 @@ export default defineConfig(() => {
__CURRENT_SITE_NAME__: JSON.stringify('Derpibooru'),
}
}),
SwapDefinedVariablesPlugin({
envVariable: 'SITE',
expectedValue: 'tantabus',
define: {
__CURRENT_SITE__: JSON.stringify('tantabus'),
__CURRENT_SITE_NAME__: JSON.stringify('Tantabus'),
}
}),
],
test: {
globals: true,