Skip to content

Commit 49c3a35

Browse files
committed
v2.0.0 - SzuruChrome Reworked
Fork of neobooru/SzuruChrome with QoL improvements: - Right-click context menu quick import - Configurable hotkey import - Real upload progress tracking (axios onUploadProgress) - iOS glassmorphism toast notifications - Modernized options page with sidebar, changelog, and 'Fork by Sumo' branding - Fixed 403 errors on rule34.xxx (credentials + Referer headers) - Fixed octet-stream upload errors (base64 message passing for MV3) - Fixed popup preview images (blob URL fallback) - Improved MIME type detection from file extensions - Filename preservation on uploads - Updated .gitignore, bilingual README (EN + DE)
0 parents  commit 49c3a35

68 files changed

Lines changed: 12778 additions & 0 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.eslintignore

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
dist
2+
node_modules
3+
public
4+
auto-imports.d.ts
5+
components.d.ts

.eslintrc.cjs

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
module.exports = {
2+
env: {
3+
browser: true,
4+
es2021: true,
5+
},
6+
extends: ["eslint:recommended", "plugin:vue/vue3-essential", "plugin:@typescript-eslint/recommended"],
7+
parser: "vue-eslint-parser",
8+
parserOptions: {
9+
ecmaVersion: "latest",
10+
parser: "@typescript-eslint/parser",
11+
sourceType: "module",
12+
},
13+
plugins: ["vue", "@typescript-eslint"],
14+
rules: {
15+
semi: ["error", "always"],
16+
"no-undef": "off",
17+
"@typescript-eslint/no-unused-vars": [
18+
"warn",
19+
{
20+
argsIgnorePattern: "^_",
21+
varsIgnorePattern: "^_",
22+
caughtErrorsIgnorePattern: "^_",
23+
},
24+
],
25+
"@typescript-eslint/no-explicit-any": "off",
26+
"eol-last": ["error", "always"],
27+
"comma-dangle": ["error", "always-multiline"],
28+
},
29+
};
Lines changed: 44 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,44 @@
1+
name: "Setup project"
2+
runs:
3+
using: "composite"
4+
steps:
5+
- uses: actions/setup-dotnet@v3
6+
with:
7+
dotnet-version: "7.0.x"
8+
9+
- name: Install GitVersion
10+
uses: gittools/actions/gitversion/setup@v0
11+
with:
12+
versionSpec: "5.x"
13+
14+
- name: Determine Version
15+
uses: gittools/actions/gitversion/execute@v0
16+
id: version
17+
with:
18+
useConfigFile: true
19+
20+
- name: Use the version
21+
shell: bash
22+
run: |
23+
echo VITE_SZ_VERSION="${{ steps.version.outputs.AssemblySemFileVer }}" >> $GITHUB_ENV
24+
echo VITE_SZ_VERSION_INFO="${{ steps.version.outputs.InformationalVersion }}" >> $GITHUB_ENV
25+
26+
- uses: pnpm/action-setup@v2
27+
name: Install pnpm
28+
id: pnpm-install
29+
with:
30+
version: 9
31+
run_install: false
32+
33+
- uses: actions/setup-node@v3
34+
with:
35+
node-version: "20"
36+
cache: "pnpm"
37+
38+
- name: Install dependencies
39+
shell: bash
40+
run: pnpm install
41+
42+
- name: Linter
43+
shell: bash
44+
run: pnpm lint

.github/workflows/build.yaml

Lines changed: 95 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,95 @@
1+
name: Build release
2+
on:
3+
push:
4+
paths:
5+
- src/**
6+
- extension/**
7+
- package.json
8+
- pnpm-lock.yaml
9+
workflow_dispatch:
10+
inputs:
11+
publish_amo_listed:
12+
description: "Publish to AMO"
13+
required: false
14+
type: boolean
15+
jobs:
16+
build_chrome:
17+
name: "Build Chrome Extension"
18+
runs-on: ubuntu-24.04
19+
steps:
20+
- name: Checkout
21+
uses: actions/checkout@v2
22+
with:
23+
fetch-depth: 0
24+
25+
- uses: ./.github/actions/setup-for-build
26+
27+
- name: Build
28+
run: pnpm build
29+
30+
- name: Pack ZIP
31+
run: pnpm pack:zip
32+
33+
- uses: actions/upload-artifact@v4
34+
with:
35+
name: Chrome Extension (Unsigned)
36+
path: extension.zip
37+
38+
build_unlisted_firefox:
39+
name: "Build Unlisted Firefox Extension"
40+
runs-on: ubuntu-24.04
41+
# Doesn't really need the Chrome build, but we can reuse its cache.
42+
needs: build_chrome
43+
if: github.ref == 'refs/heads/master' || startsWith(github.ref, 'refs/tags/v')
44+
steps:
45+
- name: Checkout
46+
uses: actions/checkout@v2
47+
with:
48+
fetch-depth: 0
49+
50+
- uses: ./.github/actions/setup-for-build
51+
52+
- name: Build
53+
run: pnpm build
54+
env:
55+
SZ_GECKO_ID: 13372607-2257-4360-8f51-5ce66fa73350
56+
57+
- name: Sign XPI
58+
run: pnpm sign:firefox --channel unlisted
59+
env:
60+
WEB_EXT_API_KEY: ${{ secrets.WEB_EXT_API_KEY }}
61+
WEB_EXT_API_SECRET: ${{ secrets.WEB_EXT_API_SECRET }}
62+
63+
- name: Rename XPI
64+
run: rename.ul szuruchrome_gh- SzuruChrome-v web-ext-artifacts/*.xpi
65+
66+
- uses: actions/upload-artifact@v4
67+
with:
68+
name: Firefox Extension (Signed)
69+
path: web-ext-artifacts/*.xpi
70+
71+
build_amo_firefox:
72+
name: "Build Firefox Extension for AMO"
73+
runs-on: ubuntu-24.04
74+
# Doesn't really need the Chrome build, but we can reuse its cache.
75+
needs: build_chrome
76+
# Only run (on master branch && if tagged) or (manually dispatching).
77+
if: startsWith(github.ref, 'refs/tags/v') || github.event.inputs.publish_amo_listed == true
78+
steps:
79+
- name: Checkout
80+
uses: actions/checkout@v2
81+
with:
82+
fetch-depth: 0
83+
84+
- uses: ./.github/actions/setup-for-build
85+
86+
- name: Build
87+
run: pnpm build
88+
env:
89+
SZ_GECKO_ID: 18365332-8485-4c04-9498-2843a41ab620
90+
91+
- name: Sign XPI and upload to AMO
92+
run: pnpm sign:firefox --channel listed
93+
env:
94+
WEB_EXT_API_KEY: ${{ secrets.WEB_EXT_API_KEY }}
95+
WEB_EXT_API_SECRET: ${{ secrets.WEB_EXT_API_SECRET }}

.gitignore

Lines changed: 48 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,48 @@
1+
# OS
2+
.DS_Store
3+
Thumbs.db
4+
Desktop.ini
5+
6+
# IDE / Editor
7+
.idea/
8+
.vscode/
9+
*.swp
10+
*.swo
11+
12+
# Dependencies
13+
node_modules/
14+
15+
# Build output
16+
dist/
17+
dist-ssr/
18+
extension/dist/
19+
extension/manifest.json
20+
*.crx
21+
*.xpi
22+
*.zip
23+
*artifacts/
24+
25+
# Vite
26+
.vite-ssg-dist
27+
.vite-ssg-temp
28+
29+
# Generated files
30+
src/auto-imports.d.ts
31+
src/components.d.ts
32+
33+
# Logs & local config
34+
*.log
35+
*.local
36+
*.pem
37+
38+
# Sensitive / credentials
39+
.env
40+
.env.*
41+
!.env.example
42+
43+
# AI / Claude context (may contain internal notes)
44+
.claude/
45+
CLAUDE.md
46+
47+
# Package manager lock (keep only one)
48+
package-lock.json

.npmrc

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
shamefully-hoist=true
2+
auto-install-peers=true
3+
strict-peer-dependencies=false

.prettierrc

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
{
2+
"printWidth": 120,
3+
"tabWidth": 2
4+
}

GitVersion.yml

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
mode: ContinuousDelivery
2+
increment: None
3+
assembly-file-versioning-format: "{Major}.{Minor}.{Patch}.{CommitsSinceVersionSource}"
4+
branches: {}
5+
ignore:
6+
sha: []
7+
merge-message-formats: {}

LICENSE

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
MIT License
2+
3+
Copyright (c) 2019 neobooru
4+
5+
Permission is hereby granted, free of charge, to any person obtaining a copy
6+
of this software and associated documentation files (the "Software"), to deal
7+
in the Software without restriction, including without limitation the rights
8+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9+
copies of the Software, and to permit persons to whom the Software is
10+
furnished to do so, subject to the following conditions:
11+
12+
The above copyright notice and this permission notice shall be included in all
13+
copies or substantial portions of the Software.
14+
15+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21+
SOFTWARE.

0 commit comments

Comments
 (0)