mirror of
https://github.com/koloml/furbooru-tagging-assistant.git
synced 2026-03-24 23:02:58 +00:00
Merge pull request #149 from koloml/feature/tantabus-support
Added Tantabus version of extension
This commit is contained in:
8
.github/workflows/build-extensions.yml
vendored
8
.github/workflows/build-extensions.yml
vendored
@@ -10,7 +10,7 @@ jobs:
|
||||
|
||||
strategy:
|
||||
matrix:
|
||||
site: [furbooru, derpibooru]
|
||||
site: [furbooru, derpibooru, tantabus]
|
||||
|
||||
steps:
|
||||
- name: Checkout repository
|
||||
@@ -27,10 +27,10 @@ jobs:
|
||||
|
||||
- name: Build extension for ${{ matrix.site }}
|
||||
run: |
|
||||
if [ "${{ matrix.site }}" = "derpibooru" ]; then
|
||||
npm run build:derpibooru
|
||||
else
|
||||
if [ "${{ matrix.site }}" = "furbooru" ]; then
|
||||
npm run build
|
||||
else
|
||||
npm run build:${{ matrix.site }}
|
||||
fi
|
||||
|
||||
- name: Create extension zip
|
||||
|
||||
@@ -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'));
|
||||
|
||||
15
README.md
15
README.md
@@ -1,8 +1,8 @@
|
||||
# Philomena Tagging Assistant
|
||||
|
||||
This is a browser extension written for the [Furbooru](https://furbooru.org) and [Derpibooru](https://derpibooru.org)
|
||||
image-boards. It gives you the ability to manually go over the list of images and apply tags to them without opening
|
||||
each individual image.
|
||||
This is a browser extension written for the [Furbooru](https://furbooru.org), [Derpibooru](https://derpibooru.org) and
|
||||
[Tantabus](https://tantabus.ai) image-boards. It gives you the ability to manually go over the list of images and apply
|
||||
tags to them without opening each individual image.
|
||||
|
||||
## Installation
|
||||
|
||||
@@ -59,14 +59,17 @@ npm install --save-dev
|
||||
Second, you need to run the `build` command. It will first build the popup using SvelteKit and then build all the
|
||||
content scripts/stylesheets and copy the manifest afterward.
|
||||
|
||||
Extension can currently be built for 2 different imageboards using one of the following commands:
|
||||
Extension can currently be built for multiple different imageboards using one of the following commands:
|
||||
|
||||
```shell
|
||||
# To build the extension for Furbooru, use:
|
||||
# Furbooru:
|
||||
npm run build
|
||||
|
||||
# To build the extension for Derpbooru, use:
|
||||
# Derpibooru:
|
||||
npm run build:derpibooru
|
||||
|
||||
# Tantabus:
|
||||
npm run build:tantabus
|
||||
```
|
||||
|
||||
When build is complete, extension files can be found in the `/build` directory. These files can be either used
|
||||
|
||||
@@ -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",
|
||||
|
||||
@@ -11,6 +11,10 @@
|
||||
if (__CURRENT_SITE__ === 'derpibooru') {
|
||||
currentSiteUrl = 'https://derpibooru.org';
|
||||
}
|
||||
|
||||
if (__CURRENT_SITE__ === 'tantabus') {
|
||||
currentSiteUrl = 'https://tantabus.ai';
|
||||
}
|
||||
</script>
|
||||
|
||||
<Menu>
|
||||
|
||||
@@ -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;
|
||||
}
|
||||
|
||||
@@ -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;
|
||||
}
|
||||
|
||||
@@ -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,
|
||||
|
||||
Reference in New Issue
Block a user