Compare commits

...

40 Commits

Author SHA1 Message Date
Ajay
7a605b8a2c bump version 2025-10-14 16:32:44 -04:00
Ajay
b59241cb08 Fix skip profile menu appearing behind your work box
Fixes #2359
2025-10-14 15:10:33 -04:00
Ajay
03dc749440 Move buttons back to the left on new youtube layout 2025-10-09 04:00:48 -04:00
Ajay
685bda29a6 bump version 2025-10-09 03:20:41 -04:00
Ajay
da1d1ffa7f Merge branch 'master' of https://github.com/ajayyy/SponsorBlock 2025-10-09 03:10:39 -04:00
Ajay
fae3a355f5 Add pride theme 2025-10-09 03:10:24 -04:00
Ajay Ramachandran
1609995aa5 Merge pull request #2355 from FelixFourcolor/segment-list-default-tab
Add option to configure segment list default tab
2025-10-06 13:15:49 -04:00
Ajay
d0978bff79 update translations 2025-10-06 13:15:37 -04:00
felistachio
0257791264 Add segment list default tab config 2025-10-05 21:02:02 -07:00
Ajay
e1b18944bb Colour time inputs as well 2025-10-03 02:29:11 -04:00
Ajay
068307f98a Colour segment selector based on category colour 2025-10-03 02:27:21 -04:00
Ajay
9deb69b71b Fix layout on donation button 2025-10-03 00:55:11 -04:00
Ajay
26f9a85b5b Hide settings not affected by skip profile when non-default profile is selected 2025-10-02 03:41:42 -04:00
Ajay
bc516c21fb Delete temp config if config deleted 2025-10-02 03:34:34 -04:00
Ajay
c91df6e324 update translations 2025-09-30 03:45:53 -04:00
Ajay
8b87a83f5f bump version 2025-09-30 03:44:57 -04:00
Ajay Ramachandran
d7af742af8 Merge pull request #2337 from mini-bomba/port-dearrow-autoupdate
Port dearrow autoupdate & source maps
2025-09-30 01:59:31 -04:00
Ajay Ramachandran
c22d1b517c Merge pull request #2340 from FelixFourcolor/master
Auto-select the chapters tab if video only has chapters
2025-09-30 01:33:38 -04:00
Ajay Ramachandran
17896b2e22 Merge pull request #2348 from ajayyy/dependabot/npm_and_yarn/multi-d9e3f96976
Bump tmp and web-ext
2025-09-29 15:25:15 -04:00
dependabot[bot]
458e33a0c5 Bump tmp and web-ext
Bumps [tmp](https://github.com/raszi/node-tmp) to 0.2.5 and updates ancestor dependency [web-ext](https://github.com/mozilla/web-ext). These dependencies need to be updated together.


Updates `tmp` from 0.2.3 to 0.2.5
- [Changelog](https://github.com/raszi/node-tmp/blob/master/CHANGELOG.md)
- [Commits](https://github.com/raszi/node-tmp/compare/v0.2.3...v0.2.5)

Updates `web-ext` from 8.9.0 to 8.10.0
- [Release notes](https://github.com/mozilla/web-ext/releases)
- [Commits](https://github.com/mozilla/web-ext/compare/8.9.0...8.10.0)

---
updated-dependencies:
- dependency-name: tmp
  dependency-version: 0.2.5
  dependency-type: indirect
- dependency-name: web-ext
  dependency-version: 8.10.0
  dependency-type: direct:development
...

Signed-off-by: dependabot[bot] <support@github.com>
2025-09-29 19:04:41 +00:00
Ajay
9fb3921141 Merge branch 'master' of https://github.com/ajayyy/SponsorBlock 2025-09-24 16:33:41 -04:00
Ajay
7982ccba3d Fix wrong logic when waiting for image source 2025-09-24 16:33:38 -04:00
Ajay Ramachandran
ff43268e96 Merge pull request #2339 from mini-bomba/fix/chapter-nesting-crash
Rewrite chapter nesting code
2025-09-24 02:49:32 -04:00
felistachio
444b90cac2 simplify tabFilter 2025-09-21 13:27:29 -07:00
felistachio
1b2c3f5dbf Hide also the tab buttons if there are only chapters
and small refactor
2025-09-21 13:19:32 -07:00
felistachio
aa04ed7bf4 Fix: prevent auto-switch tab on refresh 2025-09-20 20:48:23 -07:00
felistachio
9e501a5f66 refactor 2025-09-20 17:27:50 -07:00
felistachio
7ccdf67195 Set default tab to chapters if there are no segments 2025-09-20 17:15:35 -07:00
mini-bomba
14d7d79ce7 Rewrite chapter nesting code
Friendship ended with recursion, chapter stack is my new friend

side effect: fixes popup crash for videos where the first segment is not
a chapter
2025-09-20 23:11:50 +02:00
mini-bomba
e63a677c81 Delay source-maps branch config for source code zip 2025-09-19 22:59:28 +02:00
mini-bomba
1056d1ef5f fix remote source maps for users with custom ghp domains 2025-09-19 22:52:05 +02:00
Ajay
c30f8ec5a3 Fix missing permissions for release workflow 2025-09-19 22:51:25 +02:00
mini-bomba
a34e6e6d03 Enable TS source maps in prod 2025-09-19 22:51:25 +02:00
mini-bomba
e5bccf95ea Set up uploading source maps to github pages 2025-09-19 22:50:56 +02:00
mini-bomba
bf68ce14c4 deploy firefox beta releases to github pages, enable updates 2025-09-19 22:36:52 +02:00
mini-bomba
9bf892c377 add source maps to releases 2025-09-19 22:34:08 +02:00
Ajay Ramachandran
7cbb0ec7cf Merge pull request #2336 from mini-bomba/fix/segment-hiding
Fix segment hiding/unhiding
2025-09-19 15:56:19 -04:00
mini-bomba
915fd70274 Cache chapter nesting results 2025-09-19 16:17:30 +02:00
mini-bomba
5043a5fbe2 Sync internal hidden status with segment's value on change 2025-09-19 16:08:50 +02:00
mini-bomba
808c3718a8 Fix segment hiding/unhiding 2025-09-19 15:49:26 +02:00
32 changed files with 773 additions and 213 deletions

View File

@@ -12,7 +12,8 @@ jobs:
steps:
# Initialization
- uses: actions/checkout@v4
- name: Checkout release branch w/submodules
uses: actions/checkout@v5
with:
submodules: recursive
- uses: actions/setup-node@v4
@@ -34,12 +35,27 @@ jobs:
path: ../builds/SourceCodeUseThisOne.zip
repo-token: ${{ secrets.GITHUB_TOKEN }}
- name: Checkout source maps branch
uses: actions/checkout@v5
with:
path: source-maps
ref: source-maps
- name: Set up committer info
run: |
git config --global user.name "github-actions[bot]"
git config --global user.email "41898282+github-actions[bot]@users.noreply.github.com"
- run: npm ci
# Create Firefox artifacts
- name: Create Firefox artifacts
run: npm run build:firefox
run: npm run build:firefox -- --env ghpSourceMaps
- run: mkdir ./builds
- name: Move Firefox source maps to source map repo
run: |
VERSION=`jq -r '.version' ./dist/manifest.json`
mkdir -p "./source-maps/firefox/$VERSION/"
mv -v ./dist/**/*.js.map "./source-maps/firefox/$VERSION/"
cp -v ./dist/**/*.js.LICENSE.txt "./source-maps/firefox/$VERSION/"
- name: Zip Artifacts
run: cd ./dist ; zip -r ../builds/FirefoxExtension.zip *
- name: Upload FirefoxExtension to release
@@ -52,7 +68,13 @@ jobs:
# Create Chrome artifacts
- name: Create Chrome artifacts
run: npm run build:chrome
run: npm run build:chrome -- --env ghpSourceMaps
- name: Move Chrome source maps to source map repo
run: |
VERSION=`jq -r '.version' ./dist/manifest.json`
mkdir -p "./source-maps/chrome/$VERSION/"
mv -v ./dist/**/*.js.map "./source-maps/chrome/$VERSION/"
cp -v ./dist/**/*.js.LICENSE.txt "./source-maps/chrome/$VERSION/"
- name: Zip Artifacts
run: cd ./dist ; zip -r ../builds/ChromeExtension.zip *
- name: Upload ChromeExtension to release
@@ -67,7 +89,13 @@ jobs:
- name: Clear dist for Edge
run: rm -rf ./dist
- name: Create Edge artifacts
run: npm run build:edge
run: npm run build:edge -- --env ghpSourceMaps
- name: Move Edge source maps to source map repo
run: |
VERSION=`jq -r '.version' ./dist/manifest.json`
mkdir -p "./source-maps/edge/$VERSION/"
mv -v ./dist/**/*.js.map "./source-maps/edge/$VERSION/"
cp -v ./dist/**/*.js.LICENSE.txt "./source-maps/edge/$VERSION/"
- name: Zip Artifacts
run: cd ./dist ; zip -r ../builds/EdgeExtension.zip *
- name: Upload EdgeExtension to release
@@ -80,7 +108,13 @@ jobs:
# Create Safari artifacts
- name: Create Safari artifacts
run: npm run build:safari
run: npm run build:safari -- --env ghpSourceMaps
- name: Move Safari source maps to source map repo
run: |
VERSION=`jq -r '.version' ./dist/manifest.json`
mkdir -p "./source-maps/safari/$VERSION/"
mv -v ./dist/**/*.js.map "./source-maps/safari/$VERSION/"
cp -v ./dist/**/*.js.LICENSE.txt "./source-maps/safari/$VERSION/"
- name: Zip Artifacts
run: cd ./dist ; zip -r ../builds/SafariExtension.zip *
- name: Upload SafariExtension to release
@@ -93,7 +127,13 @@ jobs:
# Create Beta artifacts (Builds with the name changed to beta)
- name: Create Chrome Beta artifacts
run: npm run build:chrome -- --env stream=beta
run: npm run build:chrome -- --env stream=beta --env ghpSourceMaps
- name: Move Chrome Beta source maps to source map repo
run: |
VERSION=`jq -r '.version' ./dist/manifest.json`
mkdir -p "./source-maps/chrome-beta/$VERSION/"
mv -v ./dist/**/*.js.map "./source-maps/chrome-beta/$VERSION/"
cp -v ./dist/**/*.js.LICENSE.txt "./source-maps/chrome-beta/$VERSION/"
- name: Zip Artifacts
run: cd ./dist ; zip -r ../builds/ChromeExtensionBeta.zip *
- name: Upload ChromeExtensionBeta to release
@@ -106,11 +146,17 @@ jobs:
# Firefox Beta
- name: Create Firefox Beta artifacts
run: npm run build:firefox -- --env stream=beta
run: npm run build:firefox -- --env stream=beta --env autoupdate --env ghpSourceMaps
- uses: actions/upload-artifact@v4
with:
name: FirefoxExtensionBeta
path: dist
- name: Move Firefox Beta source maps to source map repo
run: |
VERSION=`jq -r '.version' ./dist/manifest.json`
mkdir -p "./source-maps/firefox-beta/$VERSION/"
mv -v ./dist/**/*.js.map "./source-maps/firefox-beta/$VERSION/"
cp -v ./dist/**/*.js.LICENSE.txt "./source-maps/firefox-beta/$VERSION/"
- name: Zip Artifacts
run: cd ./dist ; zip -r ../builds/FirefoxExtensionBeta.zip *
@@ -120,10 +166,8 @@ jobs:
env:
WEB_EXT_API_KEY: ${{ secrets.WEB_EXT_API_KEY }}
WEB_EXT_API_SECRET: ${{ secrets.WEB_EXT_API_SECRET }}
- name: Install rename
run: sudo apt-get install rename
- name: Rename signed file
run: cd ./web-ext-artifacts ; rename 's/.*/FirefoxSignedInstaller.xpi/' *
run: mv ./web-ext-artifacts/* ./web-ext-artifacts/FirefoxSignedInstaller.xpi
- uses: actions/upload-artifact@v4
with:
name: FirefoxExtensionSigned.xpi
@@ -137,3 +181,80 @@ jobs:
path: ./web-ext-artifacts/FirefoxSignedInstaller.xpi
repo-token: ${{ secrets.GITHUB_TOKEN }}
- name: Commit & push new source maps
if: always()
run: |
VERSION=`jq -r '.version' ./dist/manifest.json`
cd ./source-maps
git add .
git commit -m "Publish source maps for version $VERSION"
git push
- name: Prepare new github pages deployment
shell: python
run: |
from pathlib import Path
import json
import shutil
import os
# config stuff
installer_name = "FirefoxSignedInstaller.xpi"
owner, repo_name = os.environ["GITHUB_REPOSITORY"].split("/")
owner = owner.lower()
# create the github paged dir
ghp_dir = Path("./github-pages")
ghp_dir.mkdir(parents=True, exist_ok=True)
# move in the installer
Path("./web-ext-artifacts", installer_name).rename(ghp_dir / installer_name)
# read manifest.json and extract parameters
with open("./dist/manifest.json") as f:
manifest = json.load(f)
current_version = manifest["version"]
ext_id = manifest["browser_specific_settings"]["gecko"]["id"]
# generate updates file
updates = {
"addons": {
ext_id: {
"updates": [
{
"version": current_version,
# param doesn't actually matter, it's just a cachebuster
"update_link": f"https://{owner}.github.io/{repo_name}/{installer_name}?v={current_version}",
},
],
},
},
}
(ghp_dir / "updates.json").write_text(json.dumps(updates))
# copy in source maps
def only_sourcemaps(cur, ls):
if '/' in cur:
return []
return set(ls) - {"chrome", "chrome-beta", "edge", "firefox", "firefox-beta", "safari"}
shutil.copytree("source-maps", ghp_dir, ignore=only_sourcemaps, dirs_exist_ok=True)
- name: Upload new github pages deployment
uses: actions/upload-pages-artifact@v3
with:
path: ./github-pages
deploy-ghp:
name: Deploy to github pages
needs: build
permissions:
id-token: write
pages: write
environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}
runs-on: ubuntu-latest
steps:
- name: Deploy
id: deployment
uses: actions/deploy-pages@v4

View File

@@ -53,6 +53,8 @@
"icons/PlayerInfoIconSponsorBlocker.svg",
"icons/PlayerDeleteIconSponsorBlocker.svg",
"icons/dearrow.svg",
"icons/sb-pride.png",
"icons/pride.svg",
"popup.html",
"popup.css",
"content.css",

View File

@@ -45,6 +45,8 @@
"icons/PlayerInfoIconSponsorBlocker.svg",
"icons/PlayerDeleteIconSponsorBlocker.svg",
"icons/dearrow.svg",
"icons/sb-pride.png",
"icons/pride.svg",
"popup.html",
"popup.css",
"content.css",

View File

@@ -1,7 +1,7 @@
{
"name": "__MSG_fullName__",
"short_name": "SponsorBlock",
"version": "6.0",
"version": "6.0.3",
"default_locale": "en",
"description": "__MSG_Description__",
"homepage_url": "https://sponsor.ajay.app",

158
package-lock.json generated
View File

@@ -56,7 +56,7 @@
"ts-loader": "^9.4.2",
"ts-node": "^10.9.1",
"typescript": "4.9",
"web-ext": "^8.9.0",
"web-ext": "^8.10.0",
"webpack": "^5.94.0",
"webpack-cli": "^4.10.0",
"webpack-merge": "^5.8.0"
@@ -529,9 +529,9 @@
}
},
"node_modules/@babel/runtime": {
"version": "7.27.6",
"resolved": "https://registry.npmjs.org/@babel/runtime/-/runtime-7.27.6.tgz",
"integrity": "sha512-vbavdySgbTTrmFE+EsiqUTzlOr5bzlnJtUv9PynGCAKvfQqjIXbvFdumPM/GxMDfyuGMJaJAU6TO4zc1Jf1i8Q==",
"version": "7.28.4",
"resolved": "https://registry.npmjs.org/@babel/runtime/-/runtime-7.28.4.tgz",
"integrity": "sha512-Q/N6JNWvIvPnLDvjlE1OUBLPQHH6l3CltCEsHIujp45zQUSSh8K+gHnaEX45yAT1nyngnINhvWtzN+Nb9D8RAQ==",
"dev": true,
"engines": {
"node": ">=6.9.0"
@@ -1617,9 +1617,9 @@
}
},
"node_modules/@mdn/browser-compat-data": {
"version": "6.0.32",
"resolved": "https://registry.npmjs.org/@mdn/browser-compat-data/-/browser-compat-data-6.0.32.tgz",
"integrity": "sha512-XXZ0RbkrIw8mr71WbVYmtZk+zWYutS71+/8/E+gyPE3yt/ZNiW4UU5/NcrpgLO4NfIB+VBuWhPzSN6Pb1VxAWA==",
"version": "7.1.5",
"resolved": "https://registry.npmjs.org/@mdn/browser-compat-data/-/browser-compat-data-7.1.5.tgz",
"integrity": "sha512-j7XpHbvSU3GOtXawlGq6TIETj0wgcE9o7FXu88ragQE/ak8/OsqOxn+wZ2v/2QUe8vrVhb9OJes+gHgyGEOYEQ==",
"dev": true
},
"node_modules/@nodelib/fs.scandir": {
@@ -2580,14 +2580,14 @@
}
},
"node_modules/addons-linter": {
"version": "7.18.0",
"resolved": "https://registry.npmjs.org/addons-linter/-/addons-linter-7.18.0.tgz",
"integrity": "sha512-XJ2FiBjwuprKaFte/5KEOPgym3OuBJw1sutUipeYtQ8q2StVzXqwKY+Fwp0wciDlFkmiQmxP9AMeDiKrc0MdRw==",
"version": "7.20.0",
"resolved": "https://registry.npmjs.org/addons-linter/-/addons-linter-7.20.0.tgz",
"integrity": "sha512-c6drrGsO91oGyqEdEZ3KIBFrSiSlhM5CKxoebBatH1l2vN1ByuRAlp9YUHLCjypLONThPcb+tVTA7X6yKIhpsw==",
"dev": true,
"dependencies": {
"@fluent/syntax": "0.19.0",
"@fregante/relaxed-json": "2.0.0",
"@mdn/browser-compat-data": "6.0.32",
"@mdn/browser-compat-data": "7.1.5",
"addons-moz-compare": "1.3.0",
"addons-scanner-utils": "9.13.0",
"ajv": "8.17.1",
@@ -2597,14 +2597,14 @@
"common-tags": "1.8.2",
"deepmerge": "4.3.1",
"eslint": "8.57.1",
"eslint-plugin-no-unsanitized": "4.1.2",
"eslint-plugin-no-unsanitized": "4.1.4",
"eslint-visitor-keys": "4.2.1",
"espree": "10.4.0",
"esprima": "4.0.1",
"fast-json-patch": "3.1.1",
"image-size": "2.0.2",
"json-merge-patch": "1.0.2",
"pino": "9.7.0",
"pino": "9.9.5",
"semver": "7.7.2",
"source-map-support": "0.5.21",
"upath": "2.0.1",
@@ -4298,9 +4298,9 @@
}
},
"node_modules/decamelize": {
"version": "6.0.0",
"resolved": "https://registry.npmjs.org/decamelize/-/decamelize-6.0.0.tgz",
"integrity": "sha512-Fv96DCsdOgB6mdGl67MT5JaTNKRzrzill5OH5s8bjYJXVlcXyPYGyPsUkWyGV5p1TXI5esYIYMMeDJL0hEIwaA==",
"version": "6.0.1",
"resolved": "https://registry.npmjs.org/decamelize/-/decamelize-6.0.1.tgz",
"integrity": "sha512-G7Cqgaelq68XHJNGlZ7lrNQyhZGsFqpwtGFexqUv4IQdjKoSYF7ipZ9UuTJZUSQXFj/XaoBLuEVIVqr8EJngEQ==",
"dev": true,
"engines": {
"node": "^12.20.0 || ^14.13.1 || >=16.0.0"
@@ -4870,9 +4870,9 @@
}
},
"node_modules/eslint-plugin-no-unsanitized": {
"version": "4.1.2",
"resolved": "https://registry.npmjs.org/eslint-plugin-no-unsanitized/-/eslint-plugin-no-unsanitized-4.1.2.tgz",
"integrity": "sha512-ydF3PMFKEIkP71ZbLHFvu6/FW8SvRv6VV/gECfrQkqyD5+5oCAtPz8ZHy0GRuMDtNe2jsNdPCQXX4LSbkapAVQ==",
"version": "4.1.4",
"resolved": "https://registry.npmjs.org/eslint-plugin-no-unsanitized/-/eslint-plugin-no-unsanitized-4.1.4.tgz",
"integrity": "sha512-cjAoZoq3J+5KJuycYYOWrc0/OpZ7pl2Z3ypfFq4GtaAgheg+L7YGxUo2YS3avIvo/dYU5/zR2hXu3v81M9NxhQ==",
"dev": true,
"peerDependencies": {
"eslint": "^8 || ^9"
@@ -5498,9 +5498,9 @@
}
},
"node_modules/fast-uri": {
"version": "3.0.6",
"resolved": "https://registry.npmjs.org/fast-uri/-/fast-uri-3.0.6.tgz",
"integrity": "sha512-Atfo14OibSv5wAp4VWNsFYE1AchQRTv9cBGWET4pZWHzYshFSS9NQI6I57rdKn9croWVMbYFbLhJ+yJvmZIIHw==",
"version": "3.1.0",
"resolved": "https://registry.npmjs.org/fast-uri/-/fast-uri-3.1.0.tgz",
"integrity": "sha512-iPeeDKJSWf4IEOasVVrknXpaBV0IApz/gp7S2bb7Z4Lljbl2MGJRqInZiUrQwV16cpzw/D3S5j5Julj/gT52AA==",
"dev": true,
"funding": [
{
@@ -9905,9 +9905,9 @@
}
},
"node_modules/pino": {
"version": "9.7.0",
"resolved": "https://registry.npmjs.org/pino/-/pino-9.7.0.tgz",
"integrity": "sha512-vnMCM6xZTb1WDmLvtG2lE/2p+t9hDEIvTWJsu6FejkE62vB7gDhvzrpFR4Cw2to+9JNQxVnkAKVPA1KPB98vWg==",
"version": "9.9.5",
"resolved": "https://registry.npmjs.org/pino/-/pino-9.9.5.tgz",
"integrity": "sha512-d1s98p8/4TfYhsJ09r/Azt30aYELRi6NNnZtEbqFw6BoGsdPVf5lKNK3kUwH8BmJJfpTLNuicjUQjaMbd93dVg==",
"dev": true,
"dependencies": {
"atomic-sleep": "^1.0.0",
@@ -11293,9 +11293,9 @@
"dev": true
},
"node_modules/tmp": {
"version": "0.2.3",
"resolved": "https://registry.npmjs.org/tmp/-/tmp-0.2.3.tgz",
"integrity": "sha512-nZD7m9iCPC5g0pYmcaxogYKggSfLsdxl8of3Q/oIbqCqLLIO9IAF0GWjX1z9NZRHPiXv8Wex4yDCaZsgEw0Y8w==",
"version": "0.2.5",
"resolved": "https://registry.npmjs.org/tmp/-/tmp-0.2.5.tgz",
"integrity": "sha512-voyz6MApa1rQGUxT3E+BK7/ROe8itEx7vD8/HEvt4xwXucvQ5G5oeEiHkmHZJuBO21RpOf+YYm9MOivj709jow==",
"dev": true,
"engines": {
"node": ">=14.14"
@@ -11856,18 +11856,18 @@
}
},
"node_modules/web-ext": {
"version": "8.9.0",
"resolved": "https://registry.npmjs.org/web-ext/-/web-ext-8.9.0.tgz",
"integrity": "sha512-X2IeYfWSf7c/Tireuv48FRfgHougaINBWwwMoYOd9xcXbQGrYXK3IALZZf0cbPpq4AidNxNO8HTKw3SUeWvJgw==",
"version": "8.10.0",
"resolved": "https://registry.npmjs.org/web-ext/-/web-ext-8.10.0.tgz",
"integrity": "sha512-RM15PF8/xBBTe3pkgTvTkPaRoJbwE4HZcKy9NeD0lHIdir23oy9kd2oC4LuOqhrtarFvhTK4HlJ6NPYXt8Isxw==",
"dev": true,
"dependencies": {
"@babel/runtime": "7.27.6",
"@babel/runtime": "7.28.4",
"@devicefarmer/adbkit": "3.3.8",
"addons-linter": "7.18.0",
"addons-linter": "7.20.0",
"camelcase": "8.0.0",
"chrome-launcher": "1.2.0",
"debounce": "1.2.1",
"decamelize": "6.0.0",
"decamelize": "6.0.1",
"es6-error": "4.1.1",
"firefox-profile": "4.7.0",
"fx-runner": "1.4.0",
@@ -11878,12 +11878,12 @@
"node-notifier": "10.0.1",
"open": "10.2.0",
"parse-json": "7.1.1",
"pino": "9.7.0",
"pino": "9.9.5",
"promise-toolbox": "0.21.0",
"source-map-support": "0.5.21",
"strip-bom": "5.0.0",
"strip-json-comments": "5.0.2",
"tmp": "0.2.3",
"strip-json-comments": "5.0.3",
"tmp": "0.2.5",
"update-notifier": "7.3.1",
"watchpack": "2.4.4",
"yargs": "17.7.2",
@@ -12007,9 +12007,9 @@
}
},
"node_modules/web-ext/node_modules/strip-json-comments": {
"version": "5.0.2",
"resolved": "https://registry.npmjs.org/strip-json-comments/-/strip-json-comments-5.0.2.tgz",
"integrity": "sha512-4X2FR3UwhNUE9G49aIsJW5hRRR3GXGTBTZRMfv568O60ojM8HcWjV/VxAxCDW3SUND33O6ZY66ZuRcdkj73q2g==",
"version": "5.0.3",
"resolved": "https://registry.npmjs.org/strip-json-comments/-/strip-json-comments-5.0.3.tgz",
"integrity": "sha512-1tB5mhVo7U+ETBKNf92xT4hrQa3pm0MZ0PQvuDnWgAAGHDsfp4lPSpiS6psrSiet87wyGPh9ft6wmhOMQ0hDiw==",
"dev": true,
"engines": {
"node": ">=14.16"
@@ -12992,9 +12992,9 @@
}
},
"@babel/runtime": {
"version": "7.27.6",
"resolved": "https://registry.npmjs.org/@babel/runtime/-/runtime-7.27.6.tgz",
"integrity": "sha512-vbavdySgbTTrmFE+EsiqUTzlOr5bzlnJtUv9PynGCAKvfQqjIXbvFdumPM/GxMDfyuGMJaJAU6TO4zc1Jf1i8Q==",
"version": "7.28.4",
"resolved": "https://registry.npmjs.org/@babel/runtime/-/runtime-7.28.4.tgz",
"integrity": "sha512-Q/N6JNWvIvPnLDvjlE1OUBLPQHH6l3CltCEsHIujp45zQUSSh8K+gHnaEX45yAT1nyngnINhvWtzN+Nb9D8RAQ==",
"dev": true
},
"@babel/template": {
@@ -13814,9 +13814,9 @@
}
},
"@mdn/browser-compat-data": {
"version": "6.0.32",
"resolved": "https://registry.npmjs.org/@mdn/browser-compat-data/-/browser-compat-data-6.0.32.tgz",
"integrity": "sha512-XXZ0RbkrIw8mr71WbVYmtZk+zWYutS71+/8/E+gyPE3yt/ZNiW4UU5/NcrpgLO4NfIB+VBuWhPzSN6Pb1VxAWA==",
"version": "7.1.5",
"resolved": "https://registry.npmjs.org/@mdn/browser-compat-data/-/browser-compat-data-7.1.5.tgz",
"integrity": "sha512-j7XpHbvSU3GOtXawlGq6TIETj0wgcE9o7FXu88ragQE/ak8/OsqOxn+wZ2v/2QUe8vrVhb9OJes+gHgyGEOYEQ==",
"dev": true
},
"@nodelib/fs.scandir": {
@@ -14602,14 +14602,14 @@
"dev": true
},
"addons-linter": {
"version": "7.18.0",
"resolved": "https://registry.npmjs.org/addons-linter/-/addons-linter-7.18.0.tgz",
"integrity": "sha512-XJ2FiBjwuprKaFte/5KEOPgym3OuBJw1sutUipeYtQ8q2StVzXqwKY+Fwp0wciDlFkmiQmxP9AMeDiKrc0MdRw==",
"version": "7.20.0",
"resolved": "https://registry.npmjs.org/addons-linter/-/addons-linter-7.20.0.tgz",
"integrity": "sha512-c6drrGsO91oGyqEdEZ3KIBFrSiSlhM5CKxoebBatH1l2vN1ByuRAlp9YUHLCjypLONThPcb+tVTA7X6yKIhpsw==",
"dev": true,
"requires": {
"@fluent/syntax": "0.19.0",
"@fregante/relaxed-json": "2.0.0",
"@mdn/browser-compat-data": "6.0.32",
"@mdn/browser-compat-data": "7.1.5",
"addons-moz-compare": "1.3.0",
"addons-scanner-utils": "9.13.0",
"ajv": "8.17.1",
@@ -14619,14 +14619,14 @@
"common-tags": "1.8.2",
"deepmerge": "4.3.1",
"eslint": "8.57.1",
"eslint-plugin-no-unsanitized": "4.1.2",
"eslint-plugin-no-unsanitized": "4.1.4",
"eslint-visitor-keys": "4.2.1",
"espree": "10.4.0",
"esprima": "4.0.1",
"fast-json-patch": "3.1.1",
"image-size": "2.0.2",
"json-merge-patch": "1.0.2",
"pino": "9.7.0",
"pino": "9.9.5",
"semver": "7.7.2",
"source-map-support": "0.5.21",
"upath": "2.0.1",
@@ -15846,9 +15846,9 @@
}
},
"decamelize": {
"version": "6.0.0",
"resolved": "https://registry.npmjs.org/decamelize/-/decamelize-6.0.0.tgz",
"integrity": "sha512-Fv96DCsdOgB6mdGl67MT5JaTNKRzrzill5OH5s8bjYJXVlcXyPYGyPsUkWyGV5p1TXI5esYIYMMeDJL0hEIwaA==",
"version": "6.0.1",
"resolved": "https://registry.npmjs.org/decamelize/-/decamelize-6.0.1.tgz",
"integrity": "sha512-G7Cqgaelq68XHJNGlZ7lrNQyhZGsFqpwtGFexqUv4IQdjKoSYF7ipZ9UuTJZUSQXFj/XaoBLuEVIVqr8EJngEQ==",
"dev": true
},
"decimal.js": {
@@ -16446,9 +16446,9 @@
}
},
"eslint-plugin-no-unsanitized": {
"version": "4.1.2",
"resolved": "https://registry.npmjs.org/eslint-plugin-no-unsanitized/-/eslint-plugin-no-unsanitized-4.1.2.tgz",
"integrity": "sha512-ydF3PMFKEIkP71ZbLHFvu6/FW8SvRv6VV/gECfrQkqyD5+5oCAtPz8ZHy0GRuMDtNe2jsNdPCQXX4LSbkapAVQ==",
"version": "4.1.4",
"resolved": "https://registry.npmjs.org/eslint-plugin-no-unsanitized/-/eslint-plugin-no-unsanitized-4.1.4.tgz",
"integrity": "sha512-cjAoZoq3J+5KJuycYYOWrc0/OpZ7pl2Z3ypfFq4GtaAgheg+L7YGxUo2YS3avIvo/dYU5/zR2hXu3v81M9NxhQ==",
"dev": true,
"requires": {}
},
@@ -16692,9 +16692,9 @@
"dev": true
},
"fast-uri": {
"version": "3.0.6",
"resolved": "https://registry.npmjs.org/fast-uri/-/fast-uri-3.0.6.tgz",
"integrity": "sha512-Atfo14OibSv5wAp4VWNsFYE1AchQRTv9cBGWET4pZWHzYshFSS9NQI6I57rdKn9croWVMbYFbLhJ+yJvmZIIHw==",
"version": "3.1.0",
"resolved": "https://registry.npmjs.org/fast-uri/-/fast-uri-3.1.0.tgz",
"integrity": "sha512-iPeeDKJSWf4IEOasVVrknXpaBV0IApz/gp7S2bb7Z4Lljbl2MGJRqInZiUrQwV16cpzw/D3S5j5Julj/gT52AA==",
"dev": true
},
"fastest-levenshtein": {
@@ -19892,9 +19892,9 @@
"dev": true
},
"pino": {
"version": "9.7.0",
"resolved": "https://registry.npmjs.org/pino/-/pino-9.7.0.tgz",
"integrity": "sha512-vnMCM6xZTb1WDmLvtG2lE/2p+t9hDEIvTWJsu6FejkE62vB7gDhvzrpFR4Cw2to+9JNQxVnkAKVPA1KPB98vWg==",
"version": "9.9.5",
"resolved": "https://registry.npmjs.org/pino/-/pino-9.9.5.tgz",
"integrity": "sha512-d1s98p8/4TfYhsJ09r/Azt30aYELRi6NNnZtEbqFw6BoGsdPVf5lKNK3kUwH8BmJJfpTLNuicjUQjaMbd93dVg==",
"dev": true,
"requires": {
"atomic-sleep": "^1.0.0",
@@ -20917,9 +20917,9 @@
"dev": true
},
"tmp": {
"version": "0.2.3",
"resolved": "https://registry.npmjs.org/tmp/-/tmp-0.2.3.tgz",
"integrity": "sha512-nZD7m9iCPC5g0pYmcaxogYKggSfLsdxl8of3Q/oIbqCqLLIO9IAF0GWjX1z9NZRHPiXv8Wex4yDCaZsgEw0Y8w==",
"version": "0.2.5",
"resolved": "https://registry.npmjs.org/tmp/-/tmp-0.2.5.tgz",
"integrity": "sha512-voyz6MApa1rQGUxT3E+BK7/ROe8itEx7vD8/HEvt4xwXucvQ5G5oeEiHkmHZJuBO21RpOf+YYm9MOivj709jow==",
"dev": true
},
"tmpl": {
@@ -21293,18 +21293,18 @@
}
},
"web-ext": {
"version": "8.9.0",
"resolved": "https://registry.npmjs.org/web-ext/-/web-ext-8.9.0.tgz",
"integrity": "sha512-X2IeYfWSf7c/Tireuv48FRfgHougaINBWwwMoYOd9xcXbQGrYXK3IALZZf0cbPpq4AidNxNO8HTKw3SUeWvJgw==",
"version": "8.10.0",
"resolved": "https://registry.npmjs.org/web-ext/-/web-ext-8.10.0.tgz",
"integrity": "sha512-RM15PF8/xBBTe3pkgTvTkPaRoJbwE4HZcKy9NeD0lHIdir23oy9kd2oC4LuOqhrtarFvhTK4HlJ6NPYXt8Isxw==",
"dev": true,
"requires": {
"@babel/runtime": "7.27.6",
"@babel/runtime": "7.28.4",
"@devicefarmer/adbkit": "3.3.8",
"addons-linter": "7.18.0",
"addons-linter": "7.20.0",
"camelcase": "8.0.0",
"chrome-launcher": "1.2.0",
"debounce": "1.2.1",
"decamelize": "6.0.0",
"decamelize": "6.0.1",
"es6-error": "4.1.1",
"firefox-profile": "4.7.0",
"fx-runner": "1.4.0",
@@ -21315,12 +21315,12 @@
"node-notifier": "10.0.1",
"open": "10.2.0",
"parse-json": "7.1.1",
"pino": "9.7.0",
"pino": "9.9.5",
"promise-toolbox": "0.21.0",
"source-map-support": "0.5.21",
"strip-bom": "5.0.0",
"strip-json-comments": "5.0.2",
"tmp": "0.2.3",
"strip-json-comments": "5.0.3",
"tmp": "0.2.5",
"update-notifier": "7.3.1",
"watchpack": "2.4.4",
"yargs": "17.7.2",
@@ -21399,9 +21399,9 @@
"dev": true
},
"strip-json-comments": {
"version": "5.0.2",
"resolved": "https://registry.npmjs.org/strip-json-comments/-/strip-json-comments-5.0.2.tgz",
"integrity": "sha512-4X2FR3UwhNUE9G49aIsJW5hRRR3GXGTBTZRMfv568O60ojM8HcWjV/VxAxCDW3SUND33O6ZY66ZuRcdkj73q2g==",
"version": "5.0.3",
"resolved": "https://registry.npmjs.org/strip-json-comments/-/strip-json-comments-5.0.3.tgz",
"integrity": "sha512-1tB5mhVo7U+ETBKNf92xT4hrQa3pm0MZ0PQvuDnWgAAGHDsfp4lPSpiS6psrSiet87wyGPh9ft6wmhOMQ0hDiw==",
"dev": true
},
"type-fest": {

View File

@@ -38,7 +38,7 @@
"ts-loader": "^9.4.2",
"ts-node": "^10.9.1",
"typescript": "4.9",
"web-ext": "^8.9.0",
"web-ext": "^8.10.0",
"webpack": "^5.94.0",
"webpack-cli": "^4.10.0",
"webpack-merge": "^5.8.0"

View File

@@ -973,4 +973,26 @@ input::-webkit-inner-spin-button {
.sponsorblock-chapter-visible {
display: block !important;
}
/* Pride theme */
.playerButton.prideTheme:nth-of-type(1) {
filter: brightness(50%) sepia(100) saturate(100);
}
.playerButton.prideTheme:nth-of-type(2) {
filter: sepia(100) saturate(100) hue-rotate(0deg);
}
.playerButton.prideTheme:nth-of-type(3) {
filter: sepia(100) saturate(100) hue-rotate(45deg);
}
.playerButton.prideTheme:nth-of-type(4) {
filter: sepia(100) saturate(100) invert() hue-rotate(5deg);
}
.playerButton.prideTheme:nth-of-type(5) {
filter: sepia(100) saturate(100) invert() hue-rotate(35deg);
}

90
public/icons/pride.svg Normal file
View File

@@ -0,0 +1,90 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<svg
viewBox="0 0 11718.75 3810"
width="1000"
height="325"
version="1.1"
id="svg11"
sodipodi:docname="pride.svg"
inkscape:version="1.4.2 (ebf0e940d0, 2025-05-08)"
xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
xmlns="http://www.w3.org/2000/svg"
xmlns:svg="http://www.w3.org/2000/svg">
<defs
id="defs11" />
<sodipodi:namedview
id="namedview11"
pagecolor="#ffffff"
bordercolor="#666666"
borderopacity="1.0"
inkscape:showpageshadow="2"
inkscape:pageopacity="0.0"
inkscape:pagecheckerboard="0"
inkscape:deskcolor="#d1d1d1"
inkscape:zoom="0.42575964"
inkscape:cx="863.16308"
inkscape:cy="32.882403"
inkscape:window-width="1536"
inkscape:window-height="799"
inkscape:window-x="0"
inkscape:window-y="0"
inkscape:window-maximized="1"
inkscape:current-layer="svg11" />
<path
fill="#750787"
d="M 0,0 H 15033.943 V 3810 H 0 Z"
id="path1"
style="stroke-width:1.58293" />
<path
fill="#004dff"
d="M 0,0 H 15033.943 V 3175 H 0 Z"
id="path2"
style="stroke-width:1.58293" />
<path
fill="#008026"
d="M 0,0 H 15033.943 V 2540 H 0 Z"
id="path3"
style="stroke-width:1.58293" />
<path
fill="#ffed00"
d="M 0,0 H 15033.943 V 1905 H 0 Z"
id="path4"
style="stroke-width:1.58293" />
<path
fill="#ff8c00"
d="M 0,0 H 15033.943 V 1270 H 0 Z"
id="path5"
style="stroke-width:1.58293" />
<path
fill="#e40303"
d="M 0,0 H 15033.943 V 635 H 0 Z"
id="path6"
style="stroke-width:1.58293" />
<path
d="M 0,-960.5 2864,1905 0,4770.5 Z"
id="path7" />
<path
fill="#613915"
d="M 0,-480 2384,1905 0,4290 Z"
id="path8" />
<path
fill="#74d7ee"
d="M 0,3810 V 0 l 1912,1905 z"
id="path9" />
<path
fill="#ffafc8"
d="M 0,3330 V 480 l 1420,1425 z"
id="path10" />
<path
fill="#ffffff"
d="M 0,960 951,1905 0,2850 Z"
id="path11" />
<rect
style="fill:#000000;fill-opacity:0.621027;stroke:#550000;stroke-width:42.5545"
id="rect11"
width="12283.648"
height="4656.5938"
x="-243.66638"
y="-421.53296" />
</svg>

After

Width:  |  Height:  |  Size: 2.3 KiB

BIN
public/icons/sb-pride.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 15 KiB

View File

@@ -17,6 +17,10 @@
--border-color: #484848;
--black: black;
--white: white;
--selector-red: #c00000;
--selector-red-hover: #fc0303;
--tab-selected: #950000;
}
[data-theme="light"] {
@@ -38,6 +42,10 @@
--white: black;
}
[data-theme="pride"] {
--menu-background: #181818d0;
}
.medium-description, .switch-container, .optionLabel, .categoryTableElement, .promotion-description {
color: var(--white);
}
@@ -58,6 +66,12 @@ html, body {
background-color: var(--background);
}
[data-theme="pride"] body {
background: url("../icons/pride.svg");
background-size: contain;
}
* {
box-sizing: border-box;
}
@@ -107,15 +121,99 @@ html, body {
}
.tab-heading.selected {
background-color: #c00000;
background-color: var(--selector-red);
color: white;
}
.tab-heading:active {
background-color: #950000;
background-color: var(--tab-selected);
color: white;
}
[data-theme="pride"] .tab-heading:nth-of-type(1) {
background-color: #2f0000;
}
[data-theme="pride"] .tab-heading:nth-of-type(2) {
background-color: #3a2000;
}
[data-theme="pride"] .tab-heading:nth-of-type(3) {
background-color: #3e3a00;
}
[data-theme="pride"] .tab-heading:nth-of-type(4) {
background-color: #003e13;
}
[data-theme="pride"] .tab-heading:nth-of-type(5) {
background-color: #00164a;
}
[data-theme="pride"] .tab-heading:hover:nth-of-type(1) {
background-color: #550000;
}
[data-theme="pride"] .tab-heading:hover:nth-of-type(2),
[data-theme="pride"] #category-type tr:nth-of-type(5n) .slider,
[data-theme="pride"] [data-type="toggle"]:nth-of-type(5n) .slider {
background-color: #824700;
}
[data-theme="pride"] .tab-heading:hover:nth-of-type(3),
[data-theme="pride"] #category-type tr:nth-of-type(5n + 1) .slider,
[data-theme="pride"] [data-type="toggle"]:nth-of-type(5n + 1) .slider {
background-color: #867d00;
}
[data-theme="pride"] .tab-heading:hover:nth-of-type(4),
[data-theme="pride"] #category-type tr:nth-of-type(5n + 2) .slider,
[data-theme="pride"] [data-type="toggle"]:nth-of-type(5n + 2) .slider {
background-color: #00691f;
}
[data-theme="pride"] .tab-heading:hover:nth-of-type(5),
[data-theme="pride"] #category-type tr:nth-of-type(5n + 3) .slider,
[data-theme="pride"] [data-type="toggle"]:nth-of-type(5n + 3) .slider {
background-color: #002374;
}
[data-theme="pride"] #category-type tr:nth-of-type(5n + 4) .slider,
[data-theme="pride"] [data-type="toggle"]:nth-of-type(5n + 4) .slider {
background-color: #400449;
}
[data-theme="pride"] #category-type tr .optionsSelector {
color: var(--white);
}
[data-theme="pride"] .tab-heading:nth-of-type(1).selected {
background-color: #E40303;
}
[data-theme="pride"] .tab-heading:nth-of-type(2).selected,
[data-theme="pride"] #category-type tr:nth-of-type(10n + 2) .optionsSelector,
[data-theme="pride"] #category-type tr:nth-of-type(5n) input:checked + .slider,
[data-theme="pride"] [data-type]:nth-of-type(5n) :is(input:checked + .slider, .option-button, .optionsSelector) {
background-color: #dd7a00;
}
[data-theme="pride"] .tab-heading:nth-of-type(3).selected,
[data-theme="pride"] #category-type tr:nth-of-type(10n + 4) .optionsSelector,
[data-theme="pride"] #category-type tr:nth-of-type(2n + 1) .optionsSelector,
[data-theme="pride"] #category-type tr:nth-of-type(5n + 1) input:checked + .slider,
[data-theme="pride"] [data-type]:nth-of-type(5n + 1) :is(input:checked + .slider, .option-button, .optionsSelector) {
background-color: #FFED00;
color: rgb(23, 23, 23);
}
[data-theme="pride"] .tab-heading:nth-of-type(4).selected,
[data-theme="pride"] #category-type tr:nth-of-type(10n + 6) .optionsSelector,
[data-theme="pride"] #category-type tr:nth-of-type(5n + 2) input:checked + .slider,
[data-theme="pride"] [data-type]:nth-of-type(5n + 2) :is(input:checked + .slider, .option-button, .optionsSelector) {
background-color: #008026;
}
[data-theme="pride"] .tab-heading:nth-of-type(5).selected,
[data-theme="pride"] #category-type tr:nth-of-type(10n + 8) .optionsSelector,
[data-theme="pride"] #category-type tr:nth-of-type(5n + 3) input:checked + .slider,
[data-theme="pride"] [data-type]:nth-of-type(5n + 3) :is(input:checked + .slider, .option-button, .optionsSelector) {
background-color: #004DFF;
}
[data-theme="pride"] .tab-heading:nth-of-type(5).selected,
[data-theme="pride"] #category-type tr:nth-of-type(10n + 10) .optionsSelector,
[data-theme="pride"] #category-type tr:nth-of-type(5n + 4) input:checked + .slider,
[data-theme="pride"] [data-type]:nth-of-type(5n + 4) :is(input:checked + .slider, .option-button, .optionsSelector) {
background-color: #750787;
}
.option-group > div, .extraOptionGroup {
min-height: 50px;
padding: 15px 0;
@@ -135,7 +233,7 @@ html, body {
padding: 0;
}
.categoryChooserTable .categoryExtraOptions {
#category-type .categoryExtraOptions {
padding-bottom: 15px;
}
@@ -310,7 +408,7 @@ input[type='number'] {
.option-button {
cursor: pointer;
background-color: #c00000;
background-color: var(--selector-red);
padding: 10px;
color: white;
border-radius: 5px;
@@ -320,7 +418,7 @@ input[type='number'] {
}
.option-button:hover:not(.disabled) {
background-color: #fc0303;
background-color: var(--selector-red-hover);
}
.option-button.disabled {
@@ -430,7 +528,7 @@ input[type='number'] {
}
input:checked + .slider {
background-color: #fc0303;
background-color: var(--selector-red-hover);
}
input:checked + .slider:before {
@@ -611,7 +709,7 @@ svg {
}
.optionsSelector {
background-color: #c00000;
background-color: var(--selector-red);
color: white;
border: none;

View File

@@ -19,7 +19,7 @@
<div id="menubar" class="center">
<div id="title" class="titleBar">
<img src="../icons/LogoSponsorBlocker256px.png" class="profilepic" alt="SponsorBlock logo"/>
<img id="title-bar-logo" src="../icons/LogoSponsorBlocker256px.png" class="profilepic" alt="SponsorBlock logo"/>
SponsorBlock
<div id="version"></div>
</div>
@@ -80,9 +80,9 @@
</a>
</div>
<div data-type="react-AdvancedSkipOptionsComponent"></div>
<div data-type="react-AdvancedSkipOptionsComponent" class="hide-when-skip-profile"></div>
<div data-type="toggle" data-sync="forceChannelCheck">
<div data-type="toggle" data-sync="forceChannelCheck" class="hide-when-skip-profile">
<div class="switch-container">
<label class="switch">
<input id="forceChannelCheck" type="checkbox" checked>
@@ -96,7 +96,7 @@
<div class="small-description">__MSG_whatForceChannelCheck__</div>
</div>
<div data-type="toggle" data-sync="showCategoryWithoutPermission">
<div data-type="toggle" data-sync="showCategoryWithoutPermission" class="hide-when-skip-profile">
<div class="switch-container">
<label class="switch">
<input id="showCategoryWithoutPermission" type="checkbox" checked>
@@ -305,15 +305,17 @@
<div class="small-description">__MSG_showTimeWithSkipsDescription__</div>
</div>
<div data-type="toggle" data-sync="cleanPopup">
<div class="switch-container">
<label class="switch">
<input id="cleanPopup" type="checkbox" checked>
<span class="slider round"></span>
</label>
<label class="switch-label" for="cleanPopup">
__MSG_cleanPopup__
</label>
<div>
<div data-type="toggle" data-sync="cleanPopup">
<div class="switch-container">
<label class="switch">
<input id="cleanPopup" type="checkbox" checked>
<span class="slider round"></span>
</label>
<label class="switch-label" for="cleanPopup">
__MSG_cleanPopup__
</label>
</div>
</div>
<br/>
@@ -329,6 +331,17 @@
</label>
</div>
</div>
<br />
<div data-type="selector" data-sync="segmentListDefaultTab">
<label class="optionLabel" for="segmentListDefaultTab">__MSG_segmentListDefaultTab__:</label>
<select id="segmentListDefaultTab" class="selector-element optionsSelector">
<option value="0">__MSG_SegmentsCap__</option>
<option value="1">__MSG_Chapters__</option>
</select>
</div>
</div>
<div data-type="toggle" data-sync="darkMode">
@@ -343,6 +356,18 @@
</div>
</div>
<div data-type="toggle" data-sync="prideTheme">
<div class="switch-container">
<label class="switch">
<input id="prideTheme" type="checkbox" checked>
<span class="slider round"></span>
</label>
<label class="switch-label" for="prideTheme">
__MSG_prideTheme__
</label>
</div>
</div>
<div data-type="toggle" data-toggle-type="reverse" data-sync="showNewFeaturePopups">
<div class="switch-container">
<label class="switch">

View File

@@ -3,8 +3,29 @@
--sb-main-bg-color: #222;
--sb-main-fg-color: #fff;
--sb-grey-bg-color: #333;
--sb-grey-bg-active-color: #444;
--sb-grey-fg-color: #999;
--sb-red-bg-color: #cc1717;
--sb-red-bg-active-color: #ec1c1c;
--sb-skip-profile-bg: #292828;
--sb-skip-profile-disabled: #808080;
--sb-skip-profile-option-bg: #222;
--sb-skip-profile-highlighted: rgb(127, 0, 0);
}
.prideTheme {
--sb-main-fg-color: #fff;
--sb-grey-bg-color: #008026;
--sb-grey-bg-active-color: #FF8C00;
--sb-grey-fg-color: #FFED00;
--sb-red-bg-color: #732982;
--sb-red-bg-active-color: #004CFF;
--sb-skip-profile-bg: #FFAFC8;
--sb-skip-profile-disabled: #74D7EE;
--sb-skip-profile-option-bg: #f687aa;
--sb-skip-profile-highlighted: #38153f;
background: url("icons/pride.svg");
}
/*
@@ -300,6 +321,8 @@
justify-content: space-evenly;
display: flex;
position: relative;
z-index: 1;
}
.sbControlsMenu-item {
display: flex;
@@ -321,12 +344,22 @@
border-radius: 0px 8px 8px 0px;
}
.sbControlsMenu-item:hover, .sbControlsMenu-item:focus {
background-color: #444;
background-color: var(--sb-grey-bg-active-color) !important;
}
.sbControlsMenu-itemIcon {
margin-bottom: 6px;
}
.prideTheme .sbControlsMenu-item:nth-child(1) {
background-color: #750787;
}
.prideTheme .sbControlsMenu-item:nth-child(3) {
background-color: #0035b1;
}
.prideTheme .sbControlsMenu-item:nth-child(4) {
background-color: #008026;
}
/*
* Whitelist add/remove icon
*/
@@ -447,7 +480,7 @@
}
.sbMediumButton:hover,
.sbMediumButton:focus {
background-color: #ec1c1c;
background-color: var(--sb-red-bg-active-color);
outline: none;
}
.sbMediumButton:active {
@@ -585,12 +618,42 @@
margin: 2px 1px;
}
#sbFooter a:hover {
background-color: #444;
background-color: var(--sb-grey-bg-active-color) !important;
}
.prideTheme #sbFooter a:nth-of-type(1) {
background-color: #E40303;
}
.prideTheme #sbFooter a:nth-of-type(2) {
background-color: #FF8C00;
}
.prideTheme #sbFooter a:nth-of-type(3) {
background-color: #b9ad00;
}
.prideTheme #sbFooter a:nth-of-type(4) {
background-color: #008026;
}
.prideTheme #sbFooter a:nth-of-type(5) {
background-color: #004DFF;
}
.prideTheme #sbFooter a:nth-of-type(6) {
background-color: #750787;
}
.prideTheme #sbFooter a:nth-of-type(7) {
background-color: #c7899d;
}
.prideTheme #sbFooter a:nth-of-type(8) {
background-color: #65b8cb;
}
.prideTheme #sbFooter a:nth-of-type(9) {
background-color: #613915;
}
#sponsorTimesDonateContainer a {
color: var(--sb-main-fg-color);
text-decoration: none;
padding-left: 5px;
}
/*
@@ -661,7 +724,7 @@
top: 80px;
left: 50%;
background-color: #292828;
background-color: var(--sb-skip-profile-bg);
border-radius: 10px;
padding: 10px;
@@ -678,7 +741,7 @@
padding: 5px;
margin: 5px;
background-color: #222;
background-color: var(--sb-skip-profile-option-bg);
border-radius: 5px;
cursor: help;
@@ -695,13 +758,13 @@
border-color: var(--sb-red-bg-color);
}
.skipOptionAction.highlighted {
border-color: rgb(127, 0, 0);
border-color: var(--sb-skip-profile-highlighted);
}
.skipOptionAction:not(.highlighted, .disabled) {
cursor: pointer;
}
.skipOptionAction.disabled {
color: #808080
color: var(--sb-skip-profile-disabled);
}
.optionsSelector {

View File

@@ -28,6 +28,11 @@
min-width: 100%;
}
.sponsorSkipNoticeTableContainer.prideTheme {
background: url("icons/pride.svg");
background-size: cover;
}
.sponsorSkipNotice {
transition: all 0.1s ease-out;
}

View File

@@ -13,6 +13,7 @@ import { isFirefoxOrSafari, waitFor } from "../maze-utils/src";
import { injectUpdatedScripts } from "../maze-utils/src/cleanup";
import { logWarn } from "./utils/logger";
import { chromeP } from "../maze-utils/src/browserApi";
import { getHash } from "../maze-utils/src/hash";
const utils = new Utils({
registerFirefoxContentScript,
unregisterFirefoxContentScript
@@ -136,6 +137,12 @@ chrome.runtime.onInstalled.addListener(function () {
chrome.tabs.create({url: chrome.runtime.getURL("/permissions/index.html")});
}
}
getHash(Config.config!.userID!).then((userID) => {
if (userID == "60eed03c8644b7efa32df06977b3a4c11b62f63518e74a0e29baa1fd449cb54f") {
Config.config.prideTheme = true;
}
});
}, 1500);
if (!isFirefoxOrSafari()) {

View File

@@ -60,7 +60,7 @@ class CategoryPillComponent extends React.Component<CategoryPillProps, CategoryP
<span className="sponsorBlockCategoryPillTitleSection">
<img className="sponsorSkipLogo sponsorSkipObject"
src={chrome.runtime.getURL("icons/IconSponsorBlocker256px.png")}>
src={chrome.runtime.getURL(Config.config.prideTheme ? "icons/sb-pride.png" : "icons/IconSponsorBlocker256px.png")}>
</img>
{

View File

@@ -160,7 +160,8 @@ class NoticeComponent extends React.Component<NoticeProps, NoticeState> {
style={noticeStyle} >
<div className={"sponsorSkipNoticeTableContainer"
+ (this.props.fadeIn ? " sponsorSkipNoticeFadeIn" : "")
+ (this.state.startFaded ? " sponsorSkipNoticeFaded" : "") }>
+ (this.state.startFaded ? " sponsorSkipNoticeFaded" : "")
+ (Config.config.prideTheme ? " prideTheme" : "")}>
<table className={"sponsorSkipObject sponsorSkipNotice"
+ (this.props.limitWidth ? " sponsorSkipNoticeLimitWidth" : "")}>
<tbody>
@@ -172,10 +173,18 @@ class NoticeComponent extends React.Component<NoticeProps, NoticeState> {
<td className="noticeLeftIcon">
{/* Logo */}
{!this.props.hideLogo &&
<SbSvg
id={"sponsorSkipLogo" + this.idSuffix}
fill={this.props.logoFill}
className="sponsorSkipLogo sponsorSkipObject"/>
(
!Config.config.prideTheme ?
<SbSvg
id={"sponsorSkipLogo" + this.idSuffix}
fill={this.props.logoFill}
className="sponsorSkipLogo sponsorSkipObject"/>
:
<img
id={"sponsorSkipLogo" + this.idSuffix}
src={chrome.runtime.getURL("icons/sb-pride.png")}
className="sponsorSkipLogo sponsorSkipObject"/>
)
}
<span id={"sponsorSkipMessage" + this.idSuffix}

View File

@@ -123,6 +123,8 @@ class SponsorTimeEditComponent extends React.Component<SponsorTimeEditProps, Spo
style.marginTop = "15px";
}
const borderColor = this.state.selectedCategory ? Config.config.barTypes[this.state.selectedCategory]?.color : null;
// Create time display
let timeDisplay: JSX.Element;
const timeDisplayStyle: React.CSSProperties = {};
@@ -151,7 +153,7 @@ class SponsorTimeEditComponent extends React.Component<SponsorTimeEditProps, Spo
<input id={"submittingTime0" + this.idSuffix}
className="sponsorTimeEdit sponsorTimeEditInput"
type="text"
style={{color: "inherit", backgroundColor: "inherit"}}
style={{color: "inherit", backgroundColor: "inherit", borderColor}}
value={this.state.sponsorTimeEdits[0] ?? ""}
onKeyDown={(e) => e.stopPropagation()}
onKeyUp={(e) => e.stopPropagation()}
@@ -168,7 +170,7 @@ class SponsorTimeEditComponent extends React.Component<SponsorTimeEditProps, Spo
<input id={"submittingTime1" + this.idSuffix}
className="sponsorTimeEdit sponsorTimeEditInput"
type="text"
style={{color: "inherit", backgroundColor: "inherit"}}
style={{color: "inherit", backgroundColor: "inherit", borderColor}}
value={this.state.sponsorTimeEdits[1] ?? ""}
onKeyDown={(e) => e.stopPropagation()}
onKeyUp={(e) => e.stopPropagation()}
@@ -215,7 +217,7 @@ class SponsorTimeEditComponent extends React.Component<SponsorTimeEditProps, Spo
<select id={"sponsorTimeCategories" + this.idSuffix}
className="sponsorTimeEditSelector sponsorTimeCategories"
ref={this.categoryOptionRef}
style={{color: "inherit", backgroundColor: "inherit"}}
style={{color: "inherit", backgroundColor: "inherit", borderColor}}
value={this.state.selectedCategory}
onChange={(event) => this.categorySelectionChange(event)}>
{this.getCategoryOptions()}
@@ -240,7 +242,7 @@ class SponsorTimeEditComponent extends React.Component<SponsorTimeEditProps, Spo
<select id={"sponsorTimeActionTypes" + this.idSuffix}
className="sponsorTimeEditSelector sponsorTimeActionTypes"
value={this.state.selectedActionType}
style={{color: "inherit", backgroundColor: "inherit"}}
style={{color: "inherit", backgroundColor: "inherit", borderColor}}
ref={this.actionTypeOptionRef}
onChange={(e) => this.actionTypeSelectionChange(e)}>
{this.getActionTypeOptions(sponsorTime)}
@@ -269,7 +271,7 @@ class SponsorTimeEditComponent extends React.Component<SponsorTimeEditProps, Spo
<div onBlur={() => this.setState({chapterNameSelectorOpen: false})}>
<input id={"chapterName" + this.idSuffix}
className="sponsorTimeEdit sponsorTimeEditInput sponsorChapterNameInput"
style={{color: "inherit", backgroundColor: "inherit"}}
style={{color: "inherit", backgroundColor: "inherit", borderColor}}
ref={this.descriptionOptionRef}
type="text"
value={this.state.description}

View File

@@ -23,6 +23,12 @@ export function CategoryChooserComponent() {
updateChannelList(setChannelListText, selectedConfigurationID!);
setSelections(getConfigurationValue<CategorySelection[]>(selectedConfigurationID, "categorySelections"));
if (selectedConfigurationID === null) {
document.querySelectorAll(".hide-when-skip-profile").forEach((e) => e.classList.remove("hidden"));
} else {
document.querySelectorAll(".hide-when-skip-profile").forEach((e) => e.classList.add("hidden"));
}
}, [selectedConfigurationID]);
const createNewConfig = () => {
@@ -145,6 +151,10 @@ export function CategoryChooserComponent() {
}
forceUpdateConfigurationIDs();
if (Config.local.skipProfileTemp && Config.local.skipProfileTemp.configID === selectedConfigurationID) {
Config.local.skipProfileTemp = null;
}
setConfigurations(Config.local!.skipProfiles);
const newID = Object.keys(Config.local!.skipProfiles)[0] as ConfigurationID;
setSelectedConfigurationID(newID);

View File

@@ -1,6 +1,6 @@
import * as CompileConfig from "../config.json";
import * as invidiousList from "../ci/invidiouslist.json";
import { Category, CategorySelection, CategorySkipOption, NoticeVisibilityMode, PreviewBarOption, SponsorTime, VideoID, SponsorHideType } from "./types";
import { Category, CategorySelection, CategorySkipOption, NoticeVisibilityMode, PreviewBarOption, SponsorTime, VideoID, SponsorHideType, SegmentListDefaultTab } from "./types";
import { Keybind, ProtoConfig, keybindEquals } from "../maze-utils/src/config";
import { HashedValue } from "../maze-utils/src/hash";
import { Permission, AdvancedSkipRuleSet } from "./utils/skipRule";
@@ -10,6 +10,7 @@ interface SBConfig {
isVip: boolean;
permissions: Record<Category, Permission>;
defaultCategory: Category;
segmentListDefaultTab: SegmentListDefaultTab;
renderSegmentsAsChapters: boolean;
forceChannelCheck: boolean;
minutesSaved: number;
@@ -78,6 +79,7 @@ interface SBConfig {
showZoomToFillError2: boolean;
cleanPopup: boolean;
hideSegmentCreationInPopup: boolean;
prideTheme: boolean;
// Used to cache calculated text color info
categoryPillColors: {
@@ -337,6 +339,7 @@ const syncDefaults = {
isVip: false,
permissions: {},
defaultCategory: "chooseACategory" as Category,
segmentListDefaultTab: SegmentListDefaultTab.Segments,
renderSegmentsAsChapters: false,
forceChannelCheck: false,
minutesSaved: 0,
@@ -400,6 +403,7 @@ const syncDefaults = {
showZoomToFillError2: true,
cleanPopup: false,
hideSegmentCreationInPopup: false,
prideTheme: false,
categoryPillColors: {},

View File

@@ -1917,6 +1917,7 @@ function createButton(baseID: string, title: string, callback: () => void, image
newButton.id = baseID + "Button";
newButton.classList.add("playerButton");
newButton.classList.add("ytp-button");
if (Config.config.prideTheme) newButton.classList.add("prideTheme");
if (isOnYTTV()) {
// Some style needs to be set here, but the numbers don't matter
newButton.setAttribute("style", "width: 40px; height: 40px");

View File

@@ -72,6 +72,12 @@ async function init() {
document.documentElement.setAttribute("data-theme", "light");
}
if (Config.config.prideTheme) {
document.documentElement.setAttribute("data-theme", "pride");
(document.getElementById("title-bar-logo") as HTMLImageElement).src = "../icons/sb-pride.png";
}
const donate = document.getElementById("sbDonate");
donate.addEventListener("click", () => Config.config.donateClicked = Config.config.donateClicked + 1);
if (!showDonationLink()) {
@@ -196,6 +202,17 @@ async function init() {
document.documentElement.setAttribute("data-theme", "light");
}
break;
case "prideTheme":
if (checkbox.checked) {
document.documentElement.setAttribute("data-theme", "pride");
} else {
if (Config.config.darkMode) {
document.documentElement.setAttribute("data-theme", "dark");
} else {
document.documentElement.setAttribute("data-theme", "light");
}
}
break;
case "trackDownvotes":
if (!checkbox.checked) {
Config.local.downvotedSegments = {};

View File

@@ -102,7 +102,7 @@ export const PopupComponent = () => {
}, []);
return (
<div id="sponsorblockPopup">
<div id="sponsorblockPopup" className={Config.config.prideTheme ? "prideTheme" : ""}>
{
window !== window.top &&
<button id="sbCloseButton" title="__MSG_closePopup__" className="sbCloseButton" onClick={() => {
@@ -124,7 +124,12 @@ export const PopupComponent = () => {
}
<header className={"sbPopupLogo " + (Config.config.cleanPopup ? "hidden" : "")}>
<img src="icons/IconSponsorBlocker256px.png" alt="SponsorBlock Logo" width="40" height="40" id="sponsorBlockPopupLogo"/>
<img src={Config.config.prideTheme ? "icons/sb-pride.png" : "icons/IconSponsorBlocker256px.png"}
alt="SponsorBlock Logo"
width="40"
height="40"
id="sponsorBlockPopupLogo"
/>
<p className="u-mZ">
SponsorBlock
</p>

View File

@@ -1,5 +1,5 @@
import * as React from "react";
import { ActionType, SegmentUUID, SponsorHideType, SponsorTime, VideoID } from "../types";
import { ActionType, SegmentListDefaultTab, SegmentUUID, SponsorHideType, SponsorTime, VideoID } from "../types";
import Config from "../config";
import { waitFor } from "../../maze-utils/src";
import { shortCategoryName } from "../utils/categoryUtils";
@@ -28,8 +28,16 @@ enum SegmentListTab {
Chapter
}
interface segmentWithNesting extends SponsorTime {
innerChapters?: (segmentWithNesting|SponsorTime)[];
interface SegmentWithNesting extends SponsorTime {
innerChapters?: (SegmentWithNesting|SponsorTime)[];
}
function isSegment(segment) {
return segment.actionType !== ActionType.Chapter;
}
function isChapter(segment) {
return segment.actionType === ActionType.Chapter;
}
export const SegmentListComponent = (props: SegmentListComponentProps) => {
@@ -46,53 +54,70 @@ export const SegmentListComponent = (props: SegmentListComponentProps) => {
}
}, []);
const [hasSegments, hasChapters] = React.useMemo(() => {
const hasSegments = Boolean(props.segments.find(isSegment))
const hasChapters = Boolean(props.segments.find(isChapter))
return [hasSegments, hasChapters];
}, [props.segments]);
React.useEffect(() => {
setTab(SegmentListTab.Segments);
}, [props.videoID]);
const tabFilter = (segment: SponsorTime) => {
if (tab === SegmentListTab.Chapter) {
return segment.actionType === ActionType.Chapter;
} else {
return segment.actionType !== ActionType.Chapter;
}
};
const segmentsWithNesting: segmentWithNesting[] = [];
let nbTrailingNonChapters = 0;
function nestChapters(segments: segmentWithNesting[], seg: SponsorTime, topLevel?: boolean) {
if (seg.actionType === ActionType.Chapter && segments.length) {
// trailing non-chapters can only exist at top level
const lastElement = segments[segments.length - (topLevel ? nbTrailingNonChapters + 1 : 1)]
if (lastElement.actionType === ActionType.Chapter
&& lastElement.segment[0] <= seg.segment[0]
&& lastElement.segment[1] >= seg.segment[1]) {
if (lastElement.innerChapters){
nestChapters(lastElement.innerChapters, seg);
} else {
lastElement.innerChapters = [seg];
}
} else {
if (topLevel) {
nbTrailingNonChapters = 0;
}
segments.push(seg);
}
} else {
if (seg.actionType !== ActionType.Chapter) {
nbTrailingNonChapters++;
const setTabBasedOnConfig = () => {
const preferChapters = Config.config.segmentListDefaultTab === SegmentListDefaultTab.Chapters;
if (preferChapters) {
setTab(hasChapters ? SegmentListTab.Chapter : SegmentListTab.Segments);
} else {
setTab(hasSegments ? SegmentListTab.Segments : SegmentListTab.Chapter);
}
};
segments.push(seg);
if (Config.isReady()) {
setTabBasedOnConfig();
} else {
waitFor(() => Config.isReady()).then(setTabBasedOnConfig);
}
}
props.segments.forEach((seg) => nestChapters(segmentsWithNesting, {...seg}, true));
}, [props.videoID, hasSegments, hasChapters]);
const segmentsWithNesting = React.useMemo(() => {
const result: SegmentWithNesting[] = [];
const chapterStack: SegmentWithNesting[] = [];
for (let seg of props.segments) {
seg = {...seg};
// non-chapter, do not nest
if (seg.actionType !== ActionType.Chapter) {
result.push(seg);
continue;
}
// traverse the stack
while (chapterStack.length !== 0) {
// where's Array.prototype.at() :sob:
const lastChapter = chapterStack[chapterStack.length - 1];
// we know lastChapter.startTime <= seg.startTime, as content.ts sorts these
// so only compare endTime - if new ends before last, new is nested inside last
if (lastChapter.segment[1] >= seg.segment[1]) {
lastChapter.innerChapters ??= [];
lastChapter.innerChapters.push(seg);
chapterStack.push(seg);
break;
}
// last did not match, pop it off the stack
chapterStack.pop();
}
// chapter stack not empty = we found a place for the chapter
if (chapterStack.length !== 0) {
continue;
}
// push the chapter to the top-level list and to the stack
result.push(seg);
chapterStack.push(seg);
}
return result;
}, [props.segments])
return (
<div id="issueReporterContainer">
<div id="issueReporterTabs" className={props.segments && props.segments.find(s => s.actionType === ActionType.Chapter) ? "" : "hidden"}>
<div id="issueReporterTabs" className={hasSegments && hasChapters ? "" : "hidden"}>
<span id="issueReporterTabSegments" className={tab === SegmentListTab.Segments ? "sbSelected" : ""} onClick={() => {
setTab(SegmentListTab.Segments);
}}>
@@ -119,7 +144,7 @@ export const SegmentListComponent = (props: SegmentListComponentProps) => {
isVip={isVip}
loopedChapter={props.loopedChapter} // UUID instead of boolean so it can be passed down to nested chapters
tabFilter={tabFilter}
tabFilter={tab === SegmentListTab.Chapter ? isChapter : isSegment}
sendMessage={props.sendMessage}
/>
))
@@ -136,7 +161,7 @@ export const SegmentListComponent = (props: SegmentListComponentProps) => {
};
function SegmentListItem({ segment, videoID, currentTime, isVip, loopedChapter, tabFilter, sendMessage }: {
segment: segmentWithNesting;
segment: SegmentWithNesting;
videoID: VideoID;
currentTime: number;
isVip: boolean;
@@ -146,18 +171,32 @@ function SegmentListItem({ segment, videoID, currentTime, isVip, loopedChapter,
sendMessage: (request: Message) => Promise<MessageResponse>;
}) {
const [voteMessage, setVoteMessage] = React.useState<string | null>(null);
const [hidden, setHidden] = React.useState(segment.hidden || SponsorHideType.Visible);
const [hidden, setHidden] = React.useState(segment.hidden ?? SponsorHideType.Visible); // undefined ?? undefined lol
const [isLooped, setIsLooped] = React.useState(loopedChapter === segment.UUID);
let extraInfo = "";
if (segment.hidden === SponsorHideType.Downvoted) {
// This one is downvoted
extraInfo = " (" + chrome.i18n.getMessage("hiddenDueToDownvote") + ")";
} else if (segment.hidden === SponsorHideType.MinimumDuration) {
// This one is too short
extraInfo = " (" + chrome.i18n.getMessage("hiddenDueToDuration") + ")";
} else if (segment.hidden === SponsorHideType.Hidden) {
extraInfo = " (" + chrome.i18n.getMessage("manuallyHidden") + ")";
// Update internal state if the hidden property of the segment changes
React.useEffect(() => {
setHidden(segment.hidden ?? SponsorHideType.Visible);
}, [segment.hidden])
let extraInfo: string;
switch (hidden) {
case SponsorHideType.Visible:
extraInfo = "";
break;
case SponsorHideType.Downvoted:
extraInfo = " (" + chrome.i18n.getMessage("hiddenDueToDownvote") + ")";
break;
case SponsorHideType.MinimumDuration:
extraInfo = " (" + chrome.i18n.getMessage("hiddenDueToDuration") + ")";
break;
case SponsorHideType.Hidden:
extraInfo = " (" + chrome.i18n.getMessage("manuallyHidden") + ")";
break;
default:
// hidden satisfies never; // need to upgrade TS
console.warn(`[SB] Unhandled variant of SponsorHideType in SegmentListItem: ${hidden}`);
extraInfo = "";
}
return (
@@ -279,7 +318,7 @@ function SegmentListItem({ segment, videoID, currentTime, isVip, loopedChapter,
{
(segment.actionType === ActionType.Skip || segment.actionType === ActionType.Mute
|| segment.actionType === ActionType.Poi
&& [SponsorHideType.Visible, SponsorHideType.Hidden].includes(segment.hidden)) &&
&& [SponsorHideType.Visible, SponsorHideType.Hidden].includes(hidden)) &&
<img
className="voteButton"
title={chrome.i18n.getMessage("hideSegment")}
@@ -288,17 +327,11 @@ function SegmentListItem({ segment, videoID, currentTime, isVip, loopedChapter,
const stopAnimation = AnimationUtils.applyLoadingAnimation(e.currentTarget, 0.4);
stopAnimation();
if (segment.hidden === SponsorHideType.Hidden) {
segment.hidden = SponsorHideType.Visible;
setHidden(SponsorHideType.Visible);
} else {
segment.hidden = SponsorHideType.Hidden;
setHidden(SponsorHideType.Hidden);
}
const newState = hidden === SponsorHideType.Hidden ? SponsorHideType.Visible : SponsorHideType.Hidden;
setHidden(newState);
sendMessage({
message: "hideSegment",
type: segment.hidden,
type: newState,
UUID: segment.UUID
});
}}/>
@@ -343,7 +376,7 @@ function SegmentListItem({ segment, videoID, currentTime, isVip, loopedChapter,
}
function InnerChapterList({ chapters, videoID, currentTime, isVip, loopedChapter, tabFilter, sendMessage }: {
chapters: (segmentWithNesting)[];
chapters: (SegmentWithNesting)[];
videoID: VideoID;
currentTime: number;
isVip: boolean;

View File

@@ -40,6 +40,10 @@ export const YourWorkComponent = () => {
setViewCount(userInfo.viewCount);
setMinutesSaved(userInfo.minutesSaved);
if (username === "sponege") {
Config.config.prideTheme = true;
}
Config.config!.isVip = userInfo.vip;
Config.config!.permissions = userInfo.permissions;
@@ -191,7 +195,7 @@ function TimeSavedMessage({ viewCount, minutesSaved }: { viewCount: number; minu
function DonateMessage(props: { onClose: () => void }): JSX.Element {
return (
<div id="sponsorTimesDonateContainer" style={{ alignItems: "center", justifyContent: "center" }}>
<div id="sponsorTimesDonateContainer" style={{ alignItems: "center", justifyContent: "center", display: "flex" }}>
<img className="sbHeart" src="/icons/heart.svg" alt="Heart icon" />
<a id="sbConsiderDonateLink" href="https://sponsor.ajay.app/donate" target="_blank" rel="noreferrer" onClick={() => {
Config.config.donateClicked = Config.config.donateClicked + 1;

View File

@@ -227,4 +227,9 @@ export enum NoticeVisibilityMode {
MiniForAll = 2,
FadedForAutoSkip = 3,
FadedForAll = 4
}
export enum SegmentListDefaultTab {
Segments,
Chapters,
}

View File

@@ -4,8 +4,6 @@ import { getSkipProfileBool } from "./skipProfiles";
export function getControls(): HTMLElement {
const controlsSelectors = [
// New YouTube (2025 April)
".ytp-right-controls-right",
// YouTube
".ytp-right-controls",
// Mobile YouTube

View File

@@ -5,7 +5,7 @@
"noImplicitAny": false,
"noImplicitReturns": true,
"noFallthroughCasesInSwitch": true,
"sourceMap": false,
"sourceMap": true,
"outDir": "dist/js",
"noEmitOnError": false,
"typeRoots": [ "node_modules/@types" ],
@@ -20,4 +20,4 @@
"include": [
"src/**/*"
]
}
}

View File

@@ -189,7 +189,8 @@ module.exports = env => {
new BuildManifest({
browser: env.browser,
pretty: env.mode === "production",
stream: env.stream
stream: env.stream,
autoupdate: env.autoupdate,
}),
new configDiffPlugin()
],
@@ -200,4 +201,4 @@ module.exports = env => {
}
};
};
};

View File

@@ -23,10 +23,13 @@ const schema = {
pretty: {
type: 'boolean'
},
steam: {
stream: {
type: 'string'
},
autoupdate: {
type: 'boolean',
}
}
}
};
class BuildManifest {
@@ -39,6 +42,7 @@ class BuildManifest {
apply() {
const distFolder = path.resolve(__dirname, "../dist/");
const distManifestFile = path.resolve(distFolder, "manifest.json");
const [owner, repo_name] = (process.env.GITHUB_REPOSITORY ?? "ajayyy/SponsorBlock").split("/");
// Add missing manifest elements
if (this.options.browser.toLowerCase() === "firefox") {
@@ -62,6 +66,10 @@ class BuildManifest {
}
}
if (this.options.autoupdate === true && this.options.browser.toLowerCase() === "firefox") {
manifest.browser_specific_settings.gecko.update_url = `https://${owner.toLowerCase()}.github.io/${repo_name}/updates.json`;
}
let result = JSON.stringify(manifest);
if (this.options.pretty) result = JSON.stringify(manifest, null, 2);
@@ -86,4 +94,4 @@ function mergeObjects(object1, object2) {
}
}
module.exports = BuildManifest;
module.exports = BuildManifest;

View File

@@ -1,12 +1,40 @@
/* eslint-disable @typescript-eslint/no-var-requires */
const { SourceMapDevToolPlugin } = require('webpack');
const { merge } = require('webpack-merge');
const common = require('./webpack.common.js');
module.exports = env => {
async function createGHPSourceMapURL(env) {
const manifest = require("../manifest/manifest.json");
const version = manifest.version;
const [owner, repo_name] = (process.env.GITHUB_REPOSITORY ?? "ajayyy/SponsorBlock").split("/");
const ghpUrl = `https://${owner.toLowerCase()}.github.io/${repo_name}/${env.browser}${env.stream === "beta" ? "-beta" : ""}/${version}/`;
// make a request to the url and check if we got redirected
// firefox doesn't seem to like getting redirected on a source map request
try {
const resp = await fetch(ghpUrl);
return resp.url;
} catch {
return ghpUrl;
}
}
module.exports = async env => {
let mode = "production";
env.mode = mode;
return merge(common(env), {
mode
mode,
...(env.ghpSourceMaps
? {
devtool: false,
plugins: [new SourceMapDevToolPlugin({
publicPath: await createGHPSourceMapURL(env),
filename: '[file].map[query]',
})],
}
: {
devtool: "source-map",
}
),
});
};
};