Compare commits

..

10 Commits

Author SHA1 Message Date
Ajay
3f81006526 hide stuff 2022-04-01 02:22:54 -04:00
Ajay
f50110636d square icons 2022-03-27 19:02:06 -04:00
Ajay
2a64499ba9 Fix error 2022-03-27 18:45:21 -04:00
Ajay
bb901be43f Firefox manifest 2022-03-27 18:44:49 -04:00
Ajay
e4f6bbfcd6 remove thanks 2022-03-27 18:43:35 -04:00
Ajay
ece0c3c8f0 uninstall warning 2022-03-27 18:42:58 -04:00
Ajay
88fc02dacd delete translations 2022-03-27 18:30:09 -04:00
Ajay
834ae33696 better slogan 2022-03-27 18:29:34 -04:00
Ajay
46c5b5897e more implementation 2022-03-27 18:23:19 -04:00
Ajay
d2c50d2562 Reverse segments to skip content 2022-03-27 14:25:53 -04:00
187 changed files with 17664 additions and 24918 deletions

33
.eslintrc.js Normal file
View File

@@ -0,0 +1,33 @@
module.exports = {
env: {
browser: true,
es2021: true,
node: true,
jest: true,
jasmine: true,
},
extends: [
"eslint:recommended",
"plugin:react/recommended",
"plugin:@typescript-eslint/recommended",
],
parser: "@typescript-eslint/parser",
parserOptions: {
ecmaFeatures: {
jsx: true,
},
ecmaVersion: 12,
sourceType: "module",
},
plugins: ["react", "@typescript-eslint"],
rules: {
// TODO: Remove warn rules when not needed anymore
"no-self-assign": "off",
"@typescript-eslint/no-empty-interface": "off",
},
settings: {
react: {
version: "detect",
},
},
};

View File

@@ -1,37 +0,0 @@
{
"env": {
"browser": true,
"es2021": true,
"node": true,
"jest": true
},
"extends": [
"eslint:recommended",
"plugin:react/recommended",
"plugin:@typescript-eslint/recommended"
],
"parser": "@typescript-eslint/parser",
"parserOptions": {
"ecmaFeatures": {
"jsx": true
},
"ecmaVersion": 12,
"sourceType": "module"
},
"plugins": ["react", "@typescript-eslint"],
"rules": {
"@typescript-eslint/no-unused-vars": "error",
"no-self-assign": "off",
"@typescript-eslint/no-empty-interface": "off",
"react/prop-types": [2, { "ignore": ["children"] }],
"@typescript-eslint/member-delimiter-style": "warn",
"@typescript-eslint/no-non-null-assertion": "off",
"@typescript-eslint/ban-ts-comment": "off",
"@typescript-eslint/no-this-alias": "off"
},
"settings": {
"react": {
"version": "detect"
}
}
}

View File

@@ -1,4 +1,4 @@
- [ ] I agree to license my contribution under GPL-3.0 and agree to allow distribution on app stores as outlined in [LICENSE-APPSTORE](https://github.com/ajayyy/SponsorBlock/blob/master/LICENSE-APPSTORE.txt) - [ ] I agree to license my contribution under LGPL-3.0 **or** my contribution is from another project with a license compatible with LGPL-3.0
To test this pull request, follow the [instructions in the wiki](https://github.com/ajayyy/SponsorBlock/wiki/Testing-a-Pull-Request). To test this pull request, follow the [instructions in the wiki](https://github.com/ajayyy/SponsorBlock/wiki/Testing-a-Pull-Request).

View File

@@ -10,12 +10,10 @@ jobs:
steps: steps:
# Initialization # Initialization
- uses: actions/checkout@v4 - uses: actions/checkout@v2
- uses: actions/setup-node@v2
with: with:
submodules: recursive node-version: '16'
- uses: actions/setup-node@v4
with:
node-version: '18'
- run: npm ci - run: npm ci
- name: Copy configuration - name: Copy configuration
run: cp config.json.example config.json run: cp config.json.example config.json
@@ -27,44 +25,44 @@ jobs:
# Create Chrome artifacts # Create Chrome artifacts
- name: Create Chrome artifacts - name: Create Chrome artifacts
run: npm run build:chrome run: npm run build:chrome
- uses: actions/upload-artifact@v4 - uses: actions/upload-artifact@v2
with: with:
name: ChromeExtension name: ChromeExtension
path: dist path: dist
- run: mkdir ./builds - run: mkdir ./builds
- uses: montudor/action-zip@0852c26906e00f8a315c704958823928d8018b28 - uses: montudor/action-zip@v1
with: with:
args: zip -qq -r ./builds/ChromeExtension.zip ./dist args: zip -qq -r ./builds/ChromeExtension.zip ./dist
# Create Firefox artifacts # Create Firefox artifacts
- name: Create Firefox artifacts - name: Create Firefox artifacts
run: npm run build:firefox run: npm run build:firefox
- uses: actions/upload-artifact@v4 - uses: actions/upload-artifact@v2
with: with:
name: FirefoxExtension name: FirefoxExtension
path: dist path: dist
- uses: montudor/action-zip@0852c26906e00f8a315c704958823928d8018b28 - uses: montudor/action-zip@v1
with: with:
args: zip -qq -r ./builds/FirefoxExtension.zip ./dist args: zip -qq -r ./builds/FirefoxExtension.zip ./dist
# Create Beta artifacts (Builds with the name changed to beta) # Create Beta artifacts (Builds with the name changed to beta)
- name: Create Chrome Beta artifacts - name: Create Chrome Beta artifacts
run: npm run build:chrome -- --env stream=beta run: npm run build:chrome -- --env stream=beta
- uses: actions/upload-artifact@v4 - uses: actions/upload-artifact@v2
with: with:
name: ChromeExtensionBeta name: ChromeExtensionBeta
path: dist path: dist
- uses: montudor/action-zip@0852c26906e00f8a315c704958823928d8018b28 - uses: montudor/action-zip@v1
with: with:
args: zip -qq -r ./builds/ChromeExtensionBeta.zip ./dist args: zip -qq -r ./builds/ChromeExtensionBeta.zip ./dist
- name: Create Firefox Beta artifacts - name: Create Firefox Beta artifacts
run: npm run build:firefox -- --env stream=beta run: npm run build:firefox -- --env stream=beta
- uses: actions/upload-artifact@v4 - uses: actions/upload-artifact@v2
with: with:
name: FirefoxExtensionBeta name: FirefoxExtensionBeta
path: dist path: dist
- uses: montudor/action-zip@0852c26906e00f8a315c704958823928d8018b28 - uses: montudor/action-zip@v1
with: with:
args: zip -qq -r ./builds/FirefoxExtensionBeta.zip ./dist args: zip -qq -r ./builds/FirefoxExtensionBeta.zip ./dist

View File

@@ -12,151 +12,111 @@ jobs:
steps: steps:
# Initialization # Initialization
- name: Checkout release branch w/submodules - uses: actions/checkout@v2
uses: actions/checkout@v5 - uses: actions/setup-node@v2
with: with:
submodules: recursive node-version: '16'
- uses: actions/setup-node@v4 - run: npm ci
with:
node-version: '18'
- name: Copy configuration - name: Copy configuration
run: cp config.json.example config.json run: cp config.json.example config.json
# Create source artifact with submodule
- name: Create directory
run: cd ..; mkdir ./builds
- name: Zip Source code
run: zip -r ../builds/SourceCodeUseThisOne.zip *
- name: Upload Source to release
uses: Shopify/upload-to-release@07611424e04f1475ddf550e1c0dd650b867d5467
with:
args: ../builds/SourceCodeUseThisOne.zip
name: SourceCodeUseThisOne.zip
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 -- --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
uses: Shopify/upload-to-release@07611424e04f1475ddf550e1c0dd650b867d5467
with:
args: builds/FirefoxExtension.zip
name: FirefoxExtension.zip
path: ./builds/FirefoxExtension.zip
repo-token: ${{ secrets.GITHUB_TOKEN }}
# Create Chrome artifacts # Create Chrome artifacts
- name: Create Chrome artifacts - name: Create Chrome artifacts
run: npm run build:chrome -- --env ghpSourceMaps run: npm run build:chrome
- name: Move Chrome source maps to source map repo - uses: actions/upload-artifact@v2
run: | with:
VERSION=`jq -r '.version' ./dist/manifest.json` name: ChromeExtension
mkdir -p "./source-maps/chrome/$VERSION/" path: dist
mv -v ./dist/**/*.js.map "./source-maps/chrome/$VERSION/" - run: mkdir ./builds
cp -v ./dist/**/*.js.LICENSE.txt "./source-maps/chrome/$VERSION/"
- name: Zip Artifacts - name: Zip Artifacts
run: cd ./dist ; zip -r ../builds/ChromeExtension.zip * run: cd ./dist ; zip -r ../builds/ChromeExtension.zip *
# Create Firefox artifacts
- name: Create Firefox artifacts
run: npm run build:firefox
- uses: actions/upload-artifact@v2
with:
name: FirefoxExtension
path: dist
- name: Zip Artifacts
run: cd ./dist ; zip -r ../builds/FirefoxExtension.zip *
# Create Beta artifacts (Builds with the name changed to beta)
- name: Create Chrome Beta artifacts
run: npm run build:chrome -- --env stream=beta
- uses: actions/upload-artifact@v2
with:
name: ChromeExtensionBeta
path: dist
- name: Zip Artifacts
run: cd ./dist ; zip -r ../builds/ChromeExtensionBeta.zip *
# Create Safari artifacts
- name: Create Safari artifacts
run: npm run build:safari
- uses: actions/upload-artifact@v2
with:
name: SafariExtension
path: dist
- name: Zip Artifacts
run: cd ./dist ; zip -r ../builds/SafariExtension.zip *
# Create Edge artifacts
- name: Clear dist for Edge
run: rm -rf ./dist
- name: Create Edge artifacts
run: npm run build:edge
- uses: actions/upload-artifact@v2
with:
name: EdgeExtension
path: dist
- name: Zip Artifacts
run: cd ./dist ; zip -r ../builds/EdgeExtension.zip *
# Upload each release asset
- name: Upload ChromeExtension to release - name: Upload ChromeExtension to release
uses: Shopify/upload-to-release@07611424e04f1475ddf550e1c0dd650b867d5467 uses: Shopify/upload-to-release@master
with: with:
args: builds/ChromeExtension.zip args: builds/ChromeExtension.zip
name: ChromeExtension.zip name: ChromeExtension.zip
path: ./builds/ChromeExtension.zip path: ./builds/ChromeExtension.zip
repo-token: ${{ secrets.GITHUB_TOKEN }} repo-token: ${{ secrets.GITHUB_TOKEN }}
- name: Upload ChromeExtensionBeta to release
# Create Edge artifacts uses: Shopify/upload-to-release@master
- name: Clear dist for Edge with:
run: rm -rf ./dist args: builds/ChromeExtensionBeta.zip
- name: Create Edge artifacts name: ChromeExtensionBeta.zip
run: npm run build:edge -- --env ghpSourceMaps path: ./builds/ChromeExtensionBeta.zip
- name: Move Edge source maps to source map repo repo-token: ${{ secrets.GITHUB_TOKEN }}
run: | - name: Upload FirefoxExtension to release
VERSION=`jq -r '.version' ./dist/manifest.json` uses: Shopify/upload-to-release@master
mkdir -p "./source-maps/edge/$VERSION/" with:
mv -v ./dist/**/*.js.map "./source-maps/edge/$VERSION/" args: builds/FirefoxExtension.zip
cp -v ./dist/**/*.js.LICENSE.txt "./source-maps/edge/$VERSION/" name: FirefoxExtension.zip
- name: Zip Artifacts path: ./builds/FirefoxExtension.zip
run: cd ./dist ; zip -r ../builds/EdgeExtension.zip * repo-token: ${{ secrets.GITHUB_TOKEN }}
- name: Upload SafariExtension to release
uses: Shopify/upload-to-release@master
with:
args: builds/SafariExtension.zip
name: SafariExtension.zip
path: ./builds/SafariExtension.zip
repo-token: ${{ secrets.GITHUB_TOKEN }}
- name: Upload EdgeExtension to release - name: Upload EdgeExtension to release
uses: Shopify/upload-to-release@07611424e04f1475ddf550e1c0dd650b867d5467 uses: Shopify/upload-to-release@master
with: with:
args: builds/EdgeExtension.zip args: builds/EdgeExtension.zip
name: EdgeExtension.zip name: EdgeExtension.zip
path: ./builds/EdgeExtension.zip path: ./builds/EdgeExtension.zip
repo-token: ${{ secrets.GITHUB_TOKEN }} repo-token: ${{ secrets.GITHUB_TOKEN }}
# Create Safari artifacts
- name: Create Safari artifacts
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
uses: Shopify/upload-to-release@07611424e04f1475ddf550e1c0dd650b867d5467
with:
args: builds/SafariExtension.zip
name: SafariExtension.zip
path: ./builds/SafariExtension.zip
repo-token: ${{ secrets.GITHUB_TOKEN }}
# Create Beta artifacts (Builds with the name changed to beta)
- name: Create Chrome Beta artifacts
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
uses: Shopify/upload-to-release@07611424e04f1475ddf550e1c0dd650b867d5467
with:
args: builds/ChromeExtensionBeta.zip
name: ChromeExtensionBeta.zip
path: ./builds/ChromeExtensionBeta.zip
repo-token: ${{ secrets.GITHUB_TOKEN }}
# Firefox Beta # Firefox Beta
- name: Create Firefox Beta artifacts - name: Create Firefox Beta artifacts
run: npm run build:firefox -- --env stream=beta --env autoupdate --env ghpSourceMaps run: npm run build:firefox -- --env stream=beta
- uses: actions/upload-artifact@v4 - uses: actions/upload-artifact@v2
with: with:
name: FirefoxExtensionBeta name: FirefoxExtensionBeta
path: dist 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 - name: Zip Artifacts
run: cd ./dist ; zip -r ../builds/FirefoxExtensionBeta.zip * run: cd ./dist ; zip -r ../builds/FirefoxExtensionBeta.zip *
@@ -166,95 +126,20 @@ jobs:
env: env:
WEB_EXT_API_KEY: ${{ secrets.WEB_EXT_API_KEY }} WEB_EXT_API_KEY: ${{ secrets.WEB_EXT_API_KEY }}
WEB_EXT_API_SECRET: ${{ secrets.WEB_EXT_API_SECRET }} WEB_EXT_API_SECRET: ${{ secrets.WEB_EXT_API_SECRET }}
- name: Install rename
run: sudo apt-get install rename
- name: Rename signed file - name: Rename signed file
run: mv ./web-ext-artifacts/* ./web-ext-artifacts/FirefoxSignedInstaller.xpi run: cd ./web-ext-artifacts ; rename 's/.*/FirefoxSignedInstaller.xpi/' *
- uses: actions/upload-artifact@v4 - uses: actions/upload-artifact@v2
with: with:
name: FirefoxExtensionSigned.xpi name: FirefoxExtensionSigned.xpi
path: ./web-ext-artifacts/FirefoxSignedInstaller.xpi path: ./web-ext-artifacts/FirefoxSignedInstaller.xpi
- name: Upload FirefoxSignedInstaller.xpi to release - name: Upload FirefoxSignedInstaller.xpi to release
uses: Shopify/upload-to-release@07611424e04f1475ddf550e1c0dd650b867d5467 uses: Shopify/upload-to-release@master
with: with:
args: web-ext-artifacts/FirefoxSignedInstaller.xpi args: web-ext-artifacts/FirefoxSignedInstaller.xpi
name: FirefoxSignedInstaller.xpi name: FirefoxSignedInstaller.xpi
path: ./web-ext-artifacts/FirefoxSignedInstaller.xpi path: ./web-ext-artifacts/FirefoxSignedInstaller.xpi
repo-token: ${{ secrets.GITHUB_TOKEN }} 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

@@ -9,6 +9,6 @@ jobs:
runs-on: ubuntu-latest runs-on: ubuntu-latest
steps: steps:
- name: take the issue - name: take the issue
uses: bdougie/take-action@28b86cd8d25593f037406ecbf96082db2836e928 uses: bdougie/take-action@main
env: env:
GITHUB_TOKEN: ${{ github.token }} GITHUB_TOKEN: ${{ github.token }}

View File

@@ -3,34 +3,18 @@ name: Tests
on: [push, pull_request] on: [push, pull_request]
jobs: jobs:
test:
build:
name: Run tests name: Run tests
runs-on: ubuntu-latest runs-on: ubuntu-latest
steps: steps:
# Initialization # Initialization
- uses: actions/checkout@v4 - uses: actions/checkout@v2
- uses: actions/setup-node@v2
with: with:
submodules: recursive node-version: '16'
- uses: actions/setup-node@v4
with:
node-version: '18'
- run: npm ci - run: npm ci
- name: Copy configuration
run: cp config.json.example config.json
- name: Set up WireGuard Connection
uses: niklaskeerl/easy-wireguard-action@50341d5f4b8245ff3a90e278aca67b2d283c78d0
with:
WG_CONFIG_FILE: ${{ secrets.WG_CONFIG_FILE }}
- name: Run tests - name: Run tests
run: npm run test run: npm run test-without-building
- name: Upload results on fail
if: ${{ failure() }}
uses: actions/upload-artifact@v4
with:
name: Test Results
path: ./test-results

View File

@@ -12,25 +12,20 @@ jobs:
update-oss: update-oss:
runs-on: ubuntu-latest runs-on: ubuntu-latest
steps: steps:
- uses: actions/checkout@v4 - name: Checkout
uses: actions/checkout@v2
- uses: actions/setup-node@v2
with: with:
submodules: recursive node-version: '16'
- uses: actions/setup-node@v4
with:
node-version: '18'
- name: Install and generate attribution - name: Install and generate attribution
run: | run: |
npm ci npm ci
npm i -g oss-attribution-generator npm i -g oss-attribution-generator
generate-attribution generate-attribution
mv ./oss-attribution/attribution.txt ./public/oss-attribution/attribution.txt mv ./oss-attribution/attribution.txt ./public/oss-attribution/attribution.txt
- name: Prettify attributions
run: |
cd ci && npx ts-node prettify.ts
- name: Create pull request to update list - name: Create pull request to update list
uses: peter-evans/create-pull-request@v7 uses: peter-evans/create-pull-request@v3
# v4.2.3
with: with:
commit-message: Update OSS Attribution commit-message: Update OSS Attribution
author: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com> author: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>

View File

@@ -8,24 +8,21 @@ jobs:
check-list: check-list:
runs-on: ubuntu-latest runs-on: ubuntu-latest
steps: steps:
- uses: actions/checkout@v4 - name: Checkout
with: uses: actions/checkout@v2
submodules: recursive - name: Download instance list
- name: Download instance lists
run: | run: |
wget https://api.invidious.io/instances.json -O ci/invidious_instances.json wget https://api.invidious.io/instances.json -O ci/data.json
wget https://github.com/TeamPiped/piped-uptime/raw/master/history/summary.json -O ci/piped_instances.json
- name: Install dependencies - name: Install dependencies
run: npm ci run: npm ci
- name: "Run CI" - name: "Run CI"
run: npm run ci:invidious run: npm run ci:invidious
- name: Create pull request to update list - name: Create pull request to update list
uses: peter-evans/create-pull-request@v7 uses: peter-evans/create-pull-request@v3
# v4.2.3
with: with:
commit-message: Update Invidious List commit-message: Update Invidious List
author: github-actions[bot] <github-actions[bot]@users.noreply.github.com> author: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
branch: ci/update_invidious_list branch: ci/update_invidious_list
title: Update Invidious List title: Update Invidious List
body: Automated Invidious list update body: Automated Invidious list update

4
.gitignore vendored
View File

@@ -7,6 +7,4 @@ web-ext-artifacts
dist/ dist/
tmp/ tmp/
.DS_Store .DS_Store
ci/invidious_instances.json ci/data.json
ci/piped_instances.json
test-results

6
.gitmodules vendored
View File

@@ -1,6 +0,0 @@
[submodule "public/_locales"]
path = public/_locales
url = https://github.com/ajayyy/ExtensionTranslations
[submodule "maze-utils"]
path = maze-utils
url = https://github.com/ajayyy/maze-utils

View File

@@ -1,31 +1 @@
If you make any contributions to SponsorBlock after this file was created, you are agreeing that any code you have contributed will be licensed under GPL-3.0 and agree to allow distribution on app stores as outlined in LICENSE-APPSTORE. If you make any contributions to SponsorBlock after this file was created, you are agreeing that any code you have contributed will be licensed under LGPL-3.0.
# Translations
https://crowdin.com/project/sponsorblock
# Building
## Building locally
0. You must have [Node.js 22 or later](https://nodejs.org/) and npm installed. Works best on Linux
1. Clone with submodules
```bash
git clone --recursive https://github.com/ajayyy/SponsorBlock
```
Or if you already cloned it, pull submodules with
```bash
git submodule update --init --recursive
```
2. Copy the file `config.json.example` to `config.json` and adjust configuration as desired.
- Comments are invalid in JSON, make sure they are all removed.
- You will need to repeat this step in the future if you get build errors related to `CompileConfig` or `property does not exist on type ConfigClass`. This can happen for example when a new category is added.
3. Run `npm ci` in the repository to install dependencies.
4. Run `npm run build:dev` (for Chrome) or `npm run build:dev:firefox` (for Firefox) to generate a development version of the extension with source maps.
- You can also run `npm run build` (for Chrome) or `npm run build:firefox` (for Firefox) to generate a production build.
5. The built extension is now in `dist/`. You can load this folder directly in Chrome as an [unpacked extension](https://developer.chrome.com/docs/extensions/mv3/getstarted/#manifest), or convert it to a zip file to load it as a [temporary extension](https://developer.mozilla.org/docs/Tools/about:debugging#loading_a_temporary_extension) in Firefox.
## Developing with a clean profile and hot reloading
Run `npm run dev` (for Chrome) or `npm run dev:firefox` (for Firefox) to run the extension using a clean browser profile with hot reloading. This uses [`web-ext run`](https://extensionworkshop.com/documentation/develop/web-ext-command-reference/#commands).
Known chromium bug: Extension is not loaded properly on first start. Visit `chrome://extensions/` and reload the extension.
For Firefox for Android, use `npm run dev:firefox-android -- --adb-device <ip-address of the device>`. See the [Firefox documentation](https://extensionworkshop.com/documentation/develop/developing-extensions-for-firefox-for-android/#debug-your-extension) for more information. You may need to edit package.json and add the parameters directly there.

829
LICENSE
View File

@@ -1,674 +1,165 @@
GNU GENERAL PUBLIC LICENSE GNU LESSER GENERAL PUBLIC LICENSE
Version 3, 29 June 2007 Version 3, 29 June 2007
Copyright (C) 2007 Free Software Foundation, Inc. <http://fsf.org/> Copyright (C) 2007 Free Software Foundation, Inc. <https://fsf.org/>
Everyone is permitted to copy and distribute verbatim copies Everyone is permitted to copy and distribute verbatim copies
of this license document, but changing it is not allowed. of this license document, but changing it is not allowed.
Preamble
This version of the GNU Lesser General Public License incorporates
The GNU General Public License is a free, copyleft license for the terms and conditions of version 3 of the GNU General Public
software and other kinds of works. License, supplemented by the additional permissions listed below.
The licenses for most software and other practical works are designed 0. Additional Definitions.
to take away your freedom to share and change the works. By contrast,
the GNU General Public License is intended to guarantee your freedom to As used herein, "this License" refers to version 3 of the GNU Lesser
share and change all versions of a program--to make sure it remains free General Public License, and the "GNU GPL" refers to version 3 of the GNU
software for all its users. We, the Free Software Foundation, use the General Public License.
GNU General Public License for most of our software; it applies also to
any other work released this way by its authors. You can apply it to "The Library" refers to a covered work governed by this License,
your programs, too. other than an Application or a Combined Work as defined below.
When we speak of free software, we are referring to freedom, not An "Application" is any work that makes use of an interface provided
price. Our General Public Licenses are designed to make sure that you by the Library, but which is not otherwise based on the Library.
have the freedom to distribute copies of free software (and charge for Defining a subclass of a class defined by the Library is deemed a mode
them if you wish), that you receive source code or can get it if you of using an interface provided by the Library.
want it, that you can change the software or use pieces of it in new
free programs, and that you know you can do these things. A "Combined Work" is a work produced by combining or linking an
Application with the Library. The particular version of the Library
To protect your rights, we need to prevent others from denying you with which the Combined Work was made is also called the "Linked
these rights or asking you to surrender the rights. Therefore, you have Version".
certain responsibilities if you distribute copies of the software, or if
you modify it: responsibilities to respect the freedom of others. The "Minimal Corresponding Source" for a Combined Work means the
Corresponding Source for the Combined Work, excluding any source code
For example, if you distribute copies of such a program, whether for portions of the Combined Work that, considered in isolation, are
gratis or for a fee, you must pass on to the recipients the same based on the Application, and not on the Linked Version.
freedoms that you received. You must make sure that they, too, receive
or can get the source code. And you must show them these terms so they The "Corresponding Application Code" for a Combined Work means the
know their rights. object code and/or source code for the Application, including any data
and utility programs needed for reproducing the Combined Work from the
Developers that use the GNU GPL protect your rights with two steps: Application, but excluding the System Libraries of the Combined Work.
(1) assert copyright on the software, and (2) offer you this License
giving you legal permission to copy, distribute and/or modify it. 1. Exception to Section 3 of the GNU GPL.
For the developers' and authors' protection, the GPL clearly explains You may convey a covered work under sections 3 and 4 of this License
that there is no warranty for this free software. For both users' and without being bound by section 3 of the GNU GPL.
authors' sake, the GPL requires that modified versions be marked as
changed, so that their problems will not be attributed erroneously to 2. Conveying Modified Versions.
authors of previous versions.
If you modify a copy of the Library, and, in your modifications, a
Some devices are designed to deny users access to install or run facility refers to a function or data to be supplied by an Application
modified versions of the software inside them, although the manufacturer that uses the facility (other than as an argument passed when the
can do so. This is fundamentally incompatible with the aim of facility is invoked), then you may convey a copy of the modified
protecting users' freedom to change the software. The systematic version:
pattern of such abuse occurs in the area of products for individuals to
use, which is precisely where it is most unacceptable. Therefore, we a) under this License, provided that you make a good faith effort to
have designed this version of the GPL to prohibit the practice for those ensure that, in the event an Application does not supply the
products. If such problems arise substantially in other domains, we function or data, the facility still operates, and performs
stand ready to extend this provision to those domains in future versions whatever part of its purpose remains meaningful, or
of the GPL, as needed to protect the freedom of users.
b) under the GNU GPL, with none of the additional permissions of
Finally, every program is threatened constantly by software patents. this License applicable to that copy.
States should not allow patents to restrict development and use of
software on general-purpose computers, but in those that do, we wish to 3. Object Code Incorporating Material from Library Header Files.
avoid the special danger that patents applied to a free program could
make it effectively proprietary. To prevent this, the GPL assures that The object code form of an Application may incorporate material from
patents cannot be used to render the program non-free. a header file that is part of the Library. You may convey such object
code under terms of your choice, provided that, if the incorporated
The precise terms and conditions for copying, distribution and material is not limited to numerical parameters, data structure
modification follow. layouts and accessors, or small macros, inline functions and templates
(ten or fewer lines in length), you do both of the following:
TERMS AND CONDITIONS
a) Give prominent notice with each copy of the object code that the
0. Definitions. Library is used in it and that the Library and its use are
covered by this License.
"This License" refers to version 3 of the GNU General Public License.
b) Accompany the object code with a copy of the GNU GPL and this license
"Copyright" also means copyright-like laws that apply to other kinds of document.
works, such as semiconductor masks.
4. Combined Works.
"The Program" refers to any copyrightable work licensed under this
License. Each licensee is addressed as "you". "Licensees" and You may convey a Combined Work under terms of your choice that,
"recipients" may be individuals or organizations. taken together, effectively do not restrict modification of the
portions of the Library contained in the Combined Work and reverse
To "modify" a work means to copy from or adapt all or part of the work engineering for debugging such modifications, if you also do each of
in a fashion requiring copyright permission, other than the making of an the following:
exact copy. The resulting work is called a "modified version" of the
earlier work or a work "based on" the earlier work. a) Give prominent notice with each copy of the Combined Work that
the Library is used in it and that the Library and its use are
A "covered work" means either the unmodified Program or a work based covered by this License.
on the Program.
b) Accompany the Combined Work with a copy of the GNU GPL and this license
To "propagate" a work means to do anything with it that, without document.
permission, would make you directly or secondarily liable for
infringement under applicable copyright law, except executing it on a c) For a Combined Work that displays copyright notices during
computer or modifying a private copy. Propagation includes copying, execution, include the copyright notice for the Library among
distribution (with or without modification), making available to the these notices, as well as a reference directing the user to the
public, and in some countries other activities as well. copies of the GNU GPL and this license document.
To "convey" a work means any kind of propagation that enables other d) Do one of the following:
parties to make or receive copies. Mere interaction with a user through
a computer network, with no transfer of a copy, is not conveying. 0) Convey the Minimal Corresponding Source under the terms of this
License, and the Corresponding Application Code in a form
An interactive user interface displays "Appropriate Legal Notices" suitable for, and under terms that permit, the user to
to the extent that it includes a convenient and prominently visible recombine or relink the Application with a modified version of
feature that (1) displays an appropriate copyright notice, and (2) the Linked Version to produce a modified Combined Work, in the
tells the user that there is no warranty for the work (except to the manner specified by section 6 of the GNU GPL for conveying
extent that warranties are provided), that licensees may convey the Corresponding Source.
work under this License, and how to view a copy of this License. If
the interface presents a list of user commands or options, such as a 1) Use a suitable shared library mechanism for linking with the
menu, a prominent item in the list meets this criterion. Library. A suitable mechanism is one that (a) uses at run time
a copy of the Library already present on the user's computer
1. Source Code. system, and (b) will operate properly with a modified version
of the Library that is interface-compatible with the Linked
The "source code" for a work means the preferred form of the work Version.
for making modifications to it. "Object code" means any non-source
form of a work. e) Provide Installation Information, but only if you would otherwise
be required to provide such information under section 6 of the
A "Standard Interface" means an interface that either is an official GNU GPL, and only to the extent that such information is
standard defined by a recognized standards body, or, in the case of necessary to install and execute a modified version of the
interfaces specified for a particular programming language, one that Combined Work produced by recombining or relinking the
is widely used among developers working in that language. Application with a modified version of the Linked Version. (If
you use option 4d0, the Installation Information must accompany
The "System Libraries" of an executable work include anything, other the Minimal Corresponding Source and Corresponding Application
than the work as a whole, that (a) is included in the normal form of Code. If you use option 4d1, you must provide the Installation
packaging a Major Component, but which is not part of that Major Information in the manner specified by section 6 of the GNU GPL
Component, and (b) serves only to enable use of the work with that for conveying Corresponding Source.)
Major Component, or to implement a Standard Interface for which an
implementation is available to the public in source code form. A 5. Combined Libraries.
"Major Component", in this context, means a major essential component
(kernel, window system, and so on) of the specific operating system You may place library facilities that are a work based on the
(if any) on which the executable work runs, or a compiler used to Library side by side in a single library together with other library
produce the work, or an object code interpreter used to run it. facilities that are not Applications and are not covered by this
License, and convey such a combined library under terms of your
The "Corresponding Source" for a work in object code form means all choice, if you do both of the following:
the source code needed to generate, install, and (for an executable
work) run the object code and to modify the work, including scripts to a) Accompany the combined library with a copy of the same work based
control those activities. However, it does not include the work's on the Library, uncombined with any other library facilities,
System Libraries, or general-purpose tools or generally available free conveyed under the terms of this License.
programs which are used unmodified in performing those activities but
which are not part of the work. For example, Corresponding Source b) Give prominent notice with the combined library that part of it
includes interface definition files associated with source files for is a work based on the Library, and explaining where to find the
the work, and the source code for shared libraries and dynamically accompanying uncombined form of the same work.
linked subprograms that the work is specifically designed to require,
such as by intimate data communication or control flow between those 6. Revised Versions of the GNU Lesser General Public License.
subprograms and other parts of the work.
The Free Software Foundation may publish revised and/or new versions
The Corresponding Source need not include anything that users of the GNU Lesser General Public License from time to time. Such new
can regenerate automatically from other parts of the Corresponding versions will be similar in spirit to the present version, but may
Source. differ in detail to address new problems or concerns.
The Corresponding Source for a work in source code form is that Each version is given a distinguishing version number. If the
same work. Library as you received it specifies that a certain numbered version
of the GNU Lesser General Public License "or any later version"
2. Basic Permissions. applies to it, you have the option of following the terms and
conditions either of that published version or of any later version
All rights granted under this License are granted for the term of published by the Free Software Foundation. If the Library as you
copyright on the Program, and are irrevocable provided the stated received it does not specify a version number of the GNU Lesser
conditions are met. This License explicitly affirms your unlimited General Public License, you may choose any version of the GNU Lesser
permission to run the unmodified Program. The output from running a General Public License ever published by the Free Software Foundation.
covered work is covered by this License only if the output, given its
content, constitutes a covered work. This License acknowledges your If the Library as you received it specifies that a proxy can decide
rights of fair use or other equivalent, as provided by copyright law. whether future versions of the GNU Lesser General Public License shall
apply, that proxy's public statement of acceptance of any version is
You may make, run and propagate covered works that you do not permanent authorization for you to choose that version for the
convey, without conditions so long as your license otherwise remains Library.
in force. You may convey covered works to others for the sole purpose
of having them make modifications exclusively for you, or provide you
with facilities for running those works, provided that you comply with
the terms of this License in conveying all material for which you do
not control copyright. Those thus making or running the covered works
for you must do so exclusively on your behalf, under your direction
and control, on terms that prohibit them from making any copies of
your copyrighted material outside their relationship with you.
Conveying under any other circumstances is permitted solely under
the conditions stated below. Sublicensing is not allowed; section 10
makes it unnecessary.
3. Protecting Users' Legal Rights From Anti-Circumvention Law.
No covered work shall be deemed part of an effective technological
measure under any applicable law fulfilling obligations under article
11 of the WIPO copyright treaty adopted on 20 December 1996, or
similar laws prohibiting or restricting circumvention of such
measures.
When you convey a covered work, you waive any legal power to forbid
circumvention of technological measures to the extent such circumvention
is effected by exercising rights under this License with respect to
the covered work, and you disclaim any intention to limit operation or
modification of the work as a means of enforcing, against the work's
users, your or third parties' legal rights to forbid circumvention of
technological measures.
4. Conveying Verbatim Copies.
You may convey verbatim copies of the Program's source code as you
receive it, in any medium, provided that you conspicuously and
appropriately publish on each copy an appropriate copyright notice;
keep intact all notices stating that this License and any
non-permissive terms added in accord with section 7 apply to the code;
keep intact all notices of the absence of any warranty; and give all
recipients a copy of this License along with the Program.
You may charge any price or no price for each copy that you convey,
and you may offer support or warranty protection for a fee.
5. Conveying Modified Source Versions.
You may convey a work based on the Program, or the modifications to
produce it from the Program, in the form of source code under the
terms of section 4, provided that you also meet all of these conditions:
a) The work must carry prominent notices stating that you modified
it, and giving a relevant date.
b) The work must carry prominent notices stating that it is
released under this License and any conditions added under section
7. This requirement modifies the requirement in section 4 to
"keep intact all notices".
c) You must license the entire work, as a whole, under this
License to anyone who comes into possession of a copy. This
License will therefore apply, along with any applicable section 7
additional terms, to the whole of the work, and all its parts,
regardless of how they are packaged. This License gives no
permission to license the work in any other way, but it does not
invalidate such permission if you have separately received it.
d) If the work has interactive user interfaces, each must display
Appropriate Legal Notices; however, if the Program has interactive
interfaces that do not display Appropriate Legal Notices, your
work need not make them do so.
A compilation of a covered work with other separate and independent
works, which are not by their nature extensions of the covered work,
and which are not combined with it such as to form a larger program,
in or on a volume of a storage or distribution medium, is called an
"aggregate" if the compilation and its resulting copyright are not
used to limit the access or legal rights of the compilation's users
beyond what the individual works permit. Inclusion of a covered work
in an aggregate does not cause this License to apply to the other
parts of the aggregate.
6. Conveying Non-Source Forms.
You may convey a covered work in object code form under the terms
of sections 4 and 5, provided that you also convey the
machine-readable Corresponding Source under the terms of this License,
in one of these ways:
a) Convey the object code in, or embodied in, a physical product
(including a physical distribution medium), accompanied by the
Corresponding Source fixed on a durable physical medium
customarily used for software interchange.
b) Convey the object code in, or embodied in, a physical product
(including a physical distribution medium), accompanied by a
written offer, valid for at least three years and valid for as
long as you offer spare parts or customer support for that product
model, to give anyone who possesses the object code either (1) a
copy of the Corresponding Source for all the software in the
product that is covered by this License, on a durable physical
medium customarily used for software interchange, for a price no
more than your reasonable cost of physically performing this
conveying of source, or (2) access to copy the
Corresponding Source from a network server at no charge.
c) Convey individual copies of the object code with a copy of the
written offer to provide the Corresponding Source. This
alternative is allowed only occasionally and noncommercially, and
only if you received the object code with such an offer, in accord
with subsection 6b.
d) Convey the object code by offering access from a designated
place (gratis or for a charge), and offer equivalent access to the
Corresponding Source in the same way through the same place at no
further charge. You need not require recipients to copy the
Corresponding Source along with the object code. If the place to
copy the object code is a network server, the Corresponding Source
may be on a different server (operated by you or a third party)
that supports equivalent copying facilities, provided you maintain
clear directions next to the object code saying where to find the
Corresponding Source. Regardless of what server hosts the
Corresponding Source, you remain obligated to ensure that it is
available for as long as needed to satisfy these requirements.
e) Convey the object code using peer-to-peer transmission, provided
you inform other peers where the object code and Corresponding
Source of the work are being offered to the general public at no
charge under subsection 6d.
A separable portion of the object code, whose source code is excluded
from the Corresponding Source as a System Library, need not be
included in conveying the object code work.
A "User Product" is either (1) a "consumer product", which means any
tangible personal property which is normally used for personal, family,
or household purposes, or (2) anything designed or sold for incorporation
into a dwelling. In determining whether a product is a consumer product,
doubtful cases shall be resolved in favor of coverage. For a particular
product received by a particular user, "normally used" refers to a
typical or common use of that class of product, regardless of the status
of the particular user or of the way in which the particular user
actually uses, or expects or is expected to use, the product. A product
is a consumer product regardless of whether the product has substantial
commercial, industrial or non-consumer uses, unless such uses represent
the only significant mode of use of the product.
"Installation Information" for a User Product means any methods,
procedures, authorization keys, or other information required to install
and execute modified versions of a covered work in that User Product from
a modified version of its Corresponding Source. The information must
suffice to ensure that the continued functioning of the modified object
code is in no case prevented or interfered with solely because
modification has been made.
If you convey an object code work under this section in, or with, or
specifically for use in, a User Product, and the conveying occurs as
part of a transaction in which the right of possession and use of the
User Product is transferred to the recipient in perpetuity or for a
fixed term (regardless of how the transaction is characterized), the
Corresponding Source conveyed under this section must be accompanied
by the Installation Information. But this requirement does not apply
if neither you nor any third party retains the ability to install
modified object code on the User Product (for example, the work has
been installed in ROM).
The requirement to provide Installation Information does not include a
requirement to continue to provide support service, warranty, or updates
for a work that has been modified or installed by the recipient, or for
the User Product in which it has been modified or installed. Access to a
network may be denied when the modification itself materially and
adversely affects the operation of the network or violates the rules and
protocols for communication across the network.
Corresponding Source conveyed, and Installation Information provided,
in accord with this section must be in a format that is publicly
documented (and with an implementation available to the public in
source code form), and must require no special password or key for
unpacking, reading or copying.
7. Additional Terms.
"Additional permissions" are terms that supplement the terms of this
License by making exceptions from one or more of its conditions.
Additional permissions that are applicable to the entire Program shall
be treated as though they were included in this License, to the extent
that they are valid under applicable law. If additional permissions
apply only to part of the Program, that part may be used separately
under those permissions, but the entire Program remains governed by
this License without regard to the additional permissions.
When you convey a copy of a covered work, you may at your option
remove any additional permissions from that copy, or from any part of
it. (Additional permissions may be written to require their own
removal in certain cases when you modify the work.) You may place
additional permissions on material, added by you to a covered work,
for which you have or can give appropriate copyright permission.
Notwithstanding any other provision of this License, for material you
add to a covered work, you may (if authorized by the copyright holders of
that material) supplement the terms of this License with terms:
a) Disclaiming warranty or limiting liability differently from the
terms of sections 15 and 16 of this License; or
b) Requiring preservation of specified reasonable legal notices or
author attributions in that material or in the Appropriate Legal
Notices displayed by works containing it; or
c) Prohibiting misrepresentation of the origin of that material, or
requiring that modified versions of such material be marked in
reasonable ways as different from the original version; or
d) Limiting the use for publicity purposes of names of licensors or
authors of the material; or
e) Declining to grant rights under trademark law for use of some
trade names, trademarks, or service marks; or
f) Requiring indemnification of licensors and authors of that
material by anyone who conveys the material (or modified versions of
it) with contractual assumptions of liability to the recipient, for
any liability that these contractual assumptions directly impose on
those licensors and authors.
All other non-permissive additional terms are considered "further
restrictions" within the meaning of section 10. If the Program as you
received it, or any part of it, contains a notice stating that it is
governed by this License along with a term that is a further
restriction, you may remove that term. If a license document contains
a further restriction but permits relicensing or conveying under this
License, you may add to a covered work material governed by the terms
of that license document, provided that the further restriction does
not survive such relicensing or conveying.
If you add terms to a covered work in accord with this section, you
must place, in the relevant source files, a statement of the
additional terms that apply to those files, or a notice indicating
where to find the applicable terms.
Additional terms, permissive or non-permissive, may be stated in the
form of a separately written license, or stated as exceptions;
the above requirements apply either way.
8. Termination.
You may not propagate or modify a covered work except as expressly
provided under this License. Any attempt otherwise to propagate or
modify it is void, and will automatically terminate your rights under
this License (including any patent licenses granted under the third
paragraph of section 11).
However, if you cease all violation of this License, then your
license from a particular copyright holder is reinstated (a)
provisionally, unless and until the copyright holder explicitly and
finally terminates your license, and (b) permanently, if the copyright
holder fails to notify you of the violation by some reasonable means
prior to 60 days after the cessation.
Moreover, your license from a particular copyright holder is
reinstated permanently if the copyright holder notifies you of the
violation by some reasonable means, this is the first time you have
received notice of violation of this License (for any work) from that
copyright holder, and you cure the violation prior to 30 days after
your receipt of the notice.
Termination of your rights under this section does not terminate the
licenses of parties who have received copies or rights from you under
this License. If your rights have been terminated and not permanently
reinstated, you do not qualify to receive new licenses for the same
material under section 10.
9. Acceptance Not Required for Having Copies.
You are not required to accept this License in order to receive or
run a copy of the Program. Ancillary propagation of a covered work
occurring solely as a consequence of using peer-to-peer transmission
to receive a copy likewise does not require acceptance. However,
nothing other than this License grants you permission to propagate or
modify any covered work. These actions infringe copyright if you do
not accept this License. Therefore, by modifying or propagating a
covered work, you indicate your acceptance of this License to do so.
10. Automatic Licensing of Downstream Recipients.
Each time you convey a covered work, the recipient automatically
receives a license from the original licensors, to run, modify and
propagate that work, subject to this License. You are not responsible
for enforcing compliance by third parties with this License.
An "entity transaction" is a transaction transferring control of an
organization, or substantially all assets of one, or subdividing an
organization, or merging organizations. If propagation of a covered
work results from an entity transaction, each party to that
transaction who receives a copy of the work also receives whatever
licenses to the work the party's predecessor in interest had or could
give under the previous paragraph, plus a right to possession of the
Corresponding Source of the work from the predecessor in interest, if
the predecessor has it or can get it with reasonable efforts.
You may not impose any further restrictions on the exercise of the
rights granted or affirmed under this License. For example, you may
not impose a license fee, royalty, or other charge for exercise of
rights granted under this License, and you may not initiate litigation
(including a cross-claim or counterclaim in a lawsuit) alleging that
any patent claim is infringed by making, using, selling, offering for
sale, or importing the Program or any portion of it.
11. Patents.
A "contributor" is a copyright holder who authorizes use under this
License of the Program or a work on which the Program is based. The
work thus licensed is called the contributor's "contributor version".
A contributor's "essential patent claims" are all patent claims
owned or controlled by the contributor, whether already acquired or
hereafter acquired, that would be infringed by some manner, permitted
by this License, of making, using, or selling its contributor version,
but do not include claims that would be infringed only as a
consequence of further modification of the contributor version. For
purposes of this definition, "control" includes the right to grant
patent sublicenses in a manner consistent with the requirements of
this License.
Each contributor grants you a non-exclusive, worldwide, royalty-free
patent license under the contributor's essential patent claims, to
make, use, sell, offer for sale, import and otherwise run, modify and
propagate the contents of its contributor version.
In the following three paragraphs, a "patent license" is any express
agreement or commitment, however denominated, not to enforce a patent
(such as an express permission to practice a patent or covenant not to
sue for patent infringement). To "grant" such a patent license to a
party means to make such an agreement or commitment not to enforce a
patent against the party.
If you convey a covered work, knowingly relying on a patent license,
and the Corresponding Source of the work is not available for anyone
to copy, free of charge and under the terms of this License, through a
publicly available network server or other readily accessible means,
then you must either (1) cause the Corresponding Source to be so
available, or (2) arrange to deprive yourself of the benefit of the
patent license for this particular work, or (3) arrange, in a manner
consistent with the requirements of this License, to extend the patent
license to downstream recipients. "Knowingly relying" means you have
actual knowledge that, but for the patent license, your conveying the
covered work in a country, or your recipient's use of the covered work
in a country, would infringe one or more identifiable patents in that
country that you have reason to believe are valid.
If, pursuant to or in connection with a single transaction or
arrangement, you convey, or propagate by procuring conveyance of, a
covered work, and grant a patent license to some of the parties
receiving the covered work authorizing them to use, propagate, modify
or convey a specific copy of the covered work, then the patent license
you grant is automatically extended to all recipients of the covered
work and works based on it.
A patent license is "discriminatory" if it does not include within
the scope of its coverage, prohibits the exercise of, or is
conditioned on the non-exercise of one or more of the rights that are
specifically granted under this License. You may not convey a covered
work if you are a party to an arrangement with a third party that is
in the business of distributing software, under which you make payment
to the third party based on the extent of your activity of conveying
the work, and under which the third party grants, to any of the
parties who would receive the covered work from you, a discriminatory
patent license (a) in connection with copies of the covered work
conveyed by you (or copies made from those copies), or (b) primarily
for and in connection with specific products or compilations that
contain the covered work, unless you entered into that arrangement,
or that patent license was granted, prior to 28 March 2007.
Nothing in this License shall be construed as excluding or limiting
any implied license or other defenses to infringement that may
otherwise be available to you under applicable patent law.
12. No Surrender of Others' Freedom.
If conditions are imposed on you (whether by court order, agreement or
otherwise) that contradict the conditions of this License, they do not
excuse you from the conditions of this License. If you cannot convey a
covered work so as to satisfy simultaneously your obligations under this
License and any other pertinent obligations, then as a consequence you may
not convey it at all. For example, if you agree to terms that obligate you
to collect a royalty for further conveying from those to whom you convey
the Program, the only way you could satisfy both those terms and this
License would be to refrain entirely from conveying the Program.
13. Use with the GNU Affero General Public License.
Notwithstanding any other provision of this License, you have
permission to link or combine any covered work with a work licensed
under version 3 of the GNU Affero General Public License into a single
combined work, and to convey the resulting work. The terms of this
License will continue to apply to the part which is the covered work,
but the special requirements of the GNU Affero General Public License,
section 13, concerning interaction through a network will apply to the
combination as such.
14. Revised Versions of this License.
The Free Software Foundation may publish revised and/or new versions of
the GNU General Public License from time to time. Such new versions will
be similar in spirit to the present version, but may differ in detail to
address new problems or concerns.
Each version is given a distinguishing version number. If the
Program specifies that a certain numbered version of the GNU General
Public License "or any later version" applies to it, you have the
option of following the terms and conditions either of that numbered
version or of any later version published by the Free Software
Foundation. If the Program does not specify a version number of the
GNU General Public License, you may choose any version ever published
by the Free Software Foundation.
If the Program specifies that a proxy can decide which future
versions of the GNU General Public License can be used, that proxy's
public statement of acceptance of a version permanently authorizes you
to choose that version for the Program.
Later license versions may give you additional or different
permissions. However, no additional obligations are imposed on any
author or copyright holder as a result of your choosing to follow a
later version.
15. Disclaimer of Warranty.
THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY
APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT
HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY
OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO,
THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM
IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF
ALL NECESSARY SERVICING, REPAIR OR CORRECTION.
16. Limitation of Liability.
IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR CONVEYS
THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY
GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE
USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF
DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD
PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS),
EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF
SUCH DAMAGES.
17. Interpretation of Sections 15 and 16.
If the disclaimer of warranty and limitation of liability provided
above cannot be given local legal effect according to their terms,
reviewing courts shall apply local law that most closely approximates
an absolute waiver of all civil liability in connection with the
Program, unless a warranty or assumption of liability accompanies a
copy of the Program in return for a fee.
END OF TERMS AND CONDITIONS
How to Apply These Terms to Your New Programs
If you develop a new program, and you want it to be of the greatest
possible use to the public, the best way to achieve this is to make it
free software which everyone can redistribute and change under these terms.
To do so, attach the following notices to the program. It is safest
to attach them to the start of each source file to most effectively
state the exclusion of warranty; and each file should have at least
the "copyright" line and a pointer to where the full notice is found.
<one line to give the program's name and a brief idea of what it does.>
Copyright (C) <year> <name of author>
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>.
Also add information on how to contact you by electronic and paper mail.
If the program does terminal interaction, make it output a short
notice like this when it starts in an interactive mode:
<program> Copyright (C) <year> <name of author>
This program comes with ABSOLUTELY NO WARRANTY; for details type `show w'.
This is free software, and you are welcome to redistribute it
under certain conditions; type `show c' for details.
The hypothetical commands `show w' and `show c' should show the appropriate
parts of the General Public License. Of course, your program's commands
might be different; for a GUI interface, you would use an "about box".
You should also get your employer (if you work as a programmer) or school,
if any, to sign a "copyright disclaimer" for the program, if necessary.
For more information on this, and how to apply and follow the GNU GPL, see
<http://www.gnu.org/licenses/>.
The GNU General Public License does not permit incorporating your program
into proprietary programs. If your program is a subroutine library, you
may consider it more useful to permit linking proprietary applications with
the library. If this is what you want to do, use the GNU Lesser General
Public License instead of this License. But first, please read
<http://www.gnu.org/philosophy/why-not-lgpl.html>.

View File

@@ -1,13 +0,0 @@
The developers are aware that the terms of service that
apply to apps distributed via Apple's App Store services and similar app stores may conflict
with rights granted under the SponsorBlock license, the GNU General
Public License, version 3. The copyright holders of the SponsorBlock
project do not wish this conflict to prevent the otherwise-compliant
distribution of derived apps via the App Store and similar app stores.
Therefore, we have committed not to pursue any license
violation that results solely from the conflict between the GNU GPLv3
and the Apple App Store terms of service or similar app stores. In
other words, as long as you comply with the GPL in all other respects,
including its requirements to provide users with source code and the
text of the license, we will not object to your distribution of the
SponsorBlock project through the App Store.

View File

@@ -1,171 +0,0 @@
Prior to commit 7338af3b384e2297eaf710443121ac840099a9f1, this project was licensed under LGPL 3.0.
You must follow LICENSE instead if you want to use any newer version.
----
GNU LESSER GENERAL PUBLIC LICENSE
Version 3, 29 June 2007
Copyright (C) 2007 Free Software Foundation, Inc. <https://fsf.org/>
Everyone is permitted to copy and distribute verbatim copies
of this license document, but changing it is not allowed.
This version of the GNU Lesser General Public License incorporates
the terms and conditions of version 3 of the GNU General Public
License, supplemented by the additional permissions listed below.
0. Additional Definitions.
As used herein, "this License" refers to version 3 of the GNU Lesser
General Public License, and the "GNU GPL" refers to version 3 of the GNU
General Public License.
"The Library" refers to a covered work governed by this License,
other than an Application or a Combined Work as defined below.
An "Application" is any work that makes use of an interface provided
by the Library, but which is not otherwise based on the Library.
Defining a subclass of a class defined by the Library is deemed a mode
of using an interface provided by the Library.
A "Combined Work" is a work produced by combining or linking an
Application with the Library. The particular version of the Library
with which the Combined Work was made is also called the "Linked
Version".
The "Minimal Corresponding Source" for a Combined Work means the
Corresponding Source for the Combined Work, excluding any source code
for portions of the Combined Work that, considered in isolation, are
based on the Application, and not on the Linked Version.
The "Corresponding Application Code" for a Combined Work means the
object code and/or source code for the Application, including any data
and utility programs needed for reproducing the Combined Work from the
Application, but excluding the System Libraries of the Combined Work.
1. Exception to Section 3 of the GNU GPL.
You may convey a covered work under sections 3 and 4 of this License
without being bound by section 3 of the GNU GPL.
2. Conveying Modified Versions.
If you modify a copy of the Library, and, in your modifications, a
facility refers to a function or data to be supplied by an Application
that uses the facility (other than as an argument passed when the
facility is invoked), then you may convey a copy of the modified
version:
a) under this License, provided that you make a good faith effort to
ensure that, in the event an Application does not supply the
function or data, the facility still operates, and performs
whatever part of its purpose remains meaningful, or
b) under the GNU GPL, with none of the additional permissions of
this License applicable to that copy.
3. Object Code Incorporating Material from Library Header Files.
The object code form of an Application may incorporate material from
a header file that is part of the Library. You may convey such object
code under terms of your choice, provided that, if the incorporated
material is not limited to numerical parameters, data structure
layouts and accessors, or small macros, inline functions and templates
(ten or fewer lines in length), you do both of the following:
a) Give prominent notice with each copy of the object code that the
Library is used in it and that the Library and its use are
covered by this License.
b) Accompany the object code with a copy of the GNU GPL and this license
document.
4. Combined Works.
You may convey a Combined Work under terms of your choice that,
taken together, effectively do not restrict modification of the
portions of the Library contained in the Combined Work and reverse
engineering for debugging such modifications, if you also do each of
the following:
a) Give prominent notice with each copy of the Combined Work that
the Library is used in it and that the Library and its use are
covered by this License.
b) Accompany the Combined Work with a copy of the GNU GPL and this license
document.
c) For a Combined Work that displays copyright notices during
execution, include the copyright notice for the Library among
these notices, as well as a reference directing the user to the
copies of the GNU GPL and this license document.
d) Do one of the following:
0) Convey the Minimal Corresponding Source under the terms of this
License, and the Corresponding Application Code in a form
suitable for, and under terms that permit, the user to
recombine or relink the Application with a modified version of
the Linked Version to produce a modified Combined Work, in the
manner specified by section 6 of the GNU GPL for conveying
Corresponding Source.
1) Use a suitable shared library mechanism for linking with the
Library. A suitable mechanism is one that (a) uses at run time
a copy of the Library already present on the user's computer
system, and (b) will operate properly with a modified version
of the Library that is interface-compatible with the Linked
Version.
e) Provide Installation Information, but only if you would otherwise
be required to provide such information under section 6 of the
GNU GPL, and only to the extent that such information is
necessary to install and execute a modified version of the
Combined Work produced by recombining or relinking the
Application with a modified version of the Linked Version. (If
you use option 4d0, the Installation Information must accompany
the Minimal Corresponding Source and Corresponding Application
Code. If you use option 4d1, you must provide the Installation
Information in the manner specified by section 6 of the GNU GPL
for conveying Corresponding Source.)
5. Combined Libraries.
You may place library facilities that are a work based on the
Library side by side in a single library together with other library
facilities that are not Applications and are not covered by this
License, and convey such a combined library under terms of your
choice, if you do both of the following:
a) Accompany the combined library with a copy of the same work based
on the Library, uncombined with any other library facilities,
conveyed under the terms of this License.
b) Give prominent notice with the combined library that part of it
is a work based on the Library, and explaining where to find the
accompanying uncombined form of the same work.
6. Revised Versions of the GNU Lesser General Public License.
The Free Software Foundation may publish revised and/or new versions
of the GNU Lesser General Public License from time to time. Such new
versions will be similar in spirit to the present version, but may
differ in detail to address new problems or concerns.
Each version is given a distinguishing version number. If the
Library as you received it specifies that a certain numbered version
of the GNU Lesser General Public License "or any later version"
applies to it, you have the option of following the terms and
conditions either of that published version or of any later version
published by the Free Software Foundation. If the Library as you
received it does not specify a version number of the GNU Lesser
General Public License, you may choose any version of the GNU Lesser
General Public License ever published by the Free Software Foundation.
If the Library as you received it specifies that a proxy can decide
whether future versions of the GNU Lesser General Public License shall
apply, that proxy's public statement of acceptance of any version is
permanent authorization for you to choose that version for the
Library.

View File

@@ -13,7 +13,7 @@
<a href="https://addons.mozilla.org/addon/sponsorblock/?src=external-github">Firefox</a> | <a href="https://addons.mozilla.org/addon/sponsorblock/?src=external-github">Firefox</a> |
<a href="https://github.com/ajayyy/SponsorBlock/wiki/Android">Android</a> | <a href="https://github.com/ajayyy/SponsorBlock/wiki/Android">Android</a> |
<a href="https://github.com/ajayyy/SponsorBlock/wiki/Edge">Edge</a> | <a href="https://github.com/ajayyy/SponsorBlock/wiki/Edge">Edge</a> |
<a href="https://github.com/ajayyy/SponsorBlock/wiki/Safari">Safari for MacOS and iOS</a> | <a href="https://github.com/ajayyy/SponsorBlock/wiki/Safari">Safari for MacOS</a> |
<a href="https://sponsor.ajay.app">Website</a> | <a href="https://sponsor.ajay.app">Website</a> |
<a href="https://sponsor.ajay.app/stats">Stats</a> <a href="https://sponsor.ajay.app/stats">Stats</a>
</p> </p>
@@ -38,7 +38,7 @@
SponsorBlock is an open-source crowdsourced browser extension to skip sponsor segments in YouTube videos. Users submit when a sponsor happens from the extension, and the extension automatically skips sponsors it knows about. It also supports skipping other categories, such as intros, outros and reminders to subscribe. SponsorBlock is an open-source crowdsourced browser extension to skip sponsor segments in YouTube videos. Users submit when a sponsor happens from the extension, and the extension automatically skips sponsors it knows about. It also supports skipping other categories, such as intros, outros and reminders to subscribe.
It also supports Invidious. It also supports Invidio.us.
**Translate:** [![Crowdin](https://badges.crowdin.net/sponsorblock/localized.svg)](https://crowdin.com/project/sponsorblock) **Translate:** [![Crowdin](https://badges.crowdin.net/sponsorblock/localized.svg)](https://crowdin.com/project/sponsorblock)
@@ -56,14 +56,35 @@ The dataset and API are now being used in some [ports](https://github.com/ajayyy
# API # API
You can read the API docs [here](https://wiki.sponsor.ajay.app/w/API_Docs). You can read the API docs [here](https://wiki.sponsor.ajay.app/index.php/API_Docs).
# Building # Building
See [CONTRIBUTING.md](CONTRIBUTING.md)
You must have [Node.js 16](https://nodejs.org/) and npm installed.
1. Copy the file `config.json.example` to `config.json` and adjust configuration as desired.
- You will need to repeat this step in the future if you get build errors related to `CompileConfig`. This can happen for example when a new category is added.
2. Run `npm install` in the repository to install dependencies.
3. Run `npm run build:dev` (for Chrome) or `npm run build:dev:firefox` (for Firefox) to generate a development version of the extension with source maps.
- You can also run `npm run build` (for Chrome) or `npm run build:firefox` (for Firefox) to generate a production build.
4. The built extension is now in `dist/`. You can load this folder directly in Chrome as an [unpacked extension](https://developer.chrome.com/docs/extensions/mv3/getstarted/#manifest), or convert it to a zip file to load it as a [temporary extension](https://developer.mozilla.org/en-US/docs/Tools/about:debugging#loading_a_temporary_extension) in Firefox.
### Developing with a clean profile and hot reloading
Run `npm run dev` (for Chrome) or `npm run dev:firefox` (for Firefox) to run the extension using a clean browser profile with hot reloading. This uses [`web-ext run`](https://extensionworkshop.com/documentation/develop/web-ext-command-reference/#commands).
Known chromium bug: Extension is not loaded properly on first start. Visit `chrome://extensions/` and reload the extension.
For Firefox for Android, use `npm run dev:firefox-android -- --adb-device <ip-address of the device>`. See the [Firefox documentation](https://extensionworkshop.com/documentation/develop/developing-extensions-for-firefox-for-android/#debug-your-extension) for more information.
# Credit # Credit
The awesome [Invidious API](https://docs.invidious.io/) was previously used, and the server is now using [NewLeaf](https://git.sr.ht/~cadence/NewLeaf) as a to get video info from YouTube. The awesome [Invidious API](https://docs.invidious.io/API.md) was previously used, and the server is now using [NewLeaf](https://git.sr.ht/~cadence/NewLeaf) as a to get video info from YouTube.
Originally forked from [YTSponsorSkip](https://github.com/NDevTK/YTSponsorSkip), but very little code remains. Originally forked from [YTSponsorSkip](https://github.com/NDevTK/YTSponsorSkip), but very little code remains.
@@ -75,4 +96,4 @@ Icons made by:
### License ### License
This project is licensed under GNU GPL v3 or any later version This project is licensed under GNU LGPL v3 or any later version

View File

@@ -1,62 +0,0 @@
/*
This file is only ran by GitHub Actions in order to populate the Invidious instances list
This file should not be shipped with the extension
*/
/*
Criteria for inclusion:
Invidious
- uptime >= 80%
- must have been up for at least 90 days
- HTTPS only
- url includes name (this is to avoid redirects)
Piped
- 30d uptime >= 90%
- available for at least 80/90 days
- must have been up for at least 90 days
- must not be a wildcard redirect to piped.video
- must be currently up
- must have a functioning frontend
- must have a functioning API
*/
import { writeFile, existsSync } from "fs"
import { join } from "path"
import { getInvidiousList } from "./invidiousCI";
// import { getPipedList } from "./pipedCI";
const checkPath = (path: string) => existsSync(path);
const fixArray = (arr: string[]) => [...new Set(arr)].sort()
async function generateList() {
// import file from https://api.invidious.io/instances.json
const invidiousPath = join(__dirname, "invidious_instances.json");
// import file from https://github.com/TeamPiped/piped-uptime/raw/master/history/summary.json
const pipedPath = join(__dirname, "piped_instances.json");
// check if files exist
if (!checkPath(invidiousPath) || !checkPath(pipedPath)) {
console.log("Missing files")
process.exit(1);
}
// static non-invidious instances
const staticInstances = ["www.youtubekids.com"];
// invidious instances
const invidiousList = fixArray(getInvidiousList())
// piped instnaces
// const pipedList = fixArray(await getPipedList())
console.log([...staticInstances, ...invidiousList])
writeFile(
join(__dirname, "./invidiouslist.json"),
JSON.stringify([...staticInstances, ...invidiousList]),
(err) => {
if (err) return console.log(err);
}
);
}
generateList()

View File

@@ -1,34 +1,55 @@
import { InvidiousInstance, monitor } from "./invidiousType" /*
This file is only ran by GitHub Actions in order to populate the Invidious instances list
import * as data from "../ci/invidious_instances.json"; This file should not be shipped with the extension
*/
import { writeFile, existsSync } from 'fs';
import { join } from 'path';
// import file from https://api.invidious.io/instances.json
if (!existsSync(join(__dirname, "data.json"))) {
process.exit(1);
}
// eslint-disable-next-line @typescript-eslint/ban-ts-comment
// @ts-ignore
import * as data from "../ci/data.json";
type instanceMap = {
name: string,
url: string,
dailyRatios: {ratio: string, label: string }[],
thirtyDayUptime: string
}[]
// only https servers // only https servers
const mapped = (data as InvidiousInstance[]) const mapped: instanceMap = data
.filter((i) => // eslint-disable-next-line @typescript-eslint/no-explicit-any
i[1]?.type === "https" .filter((i: any) => i[1]?.type === 'https')
&& i[1]?.monitor?.enabled // eslint-disable-next-line @typescript-eslint/no-explicit-any
) .map((instance: any) => {
.map((instance) => {
const monitor = instance[1].monitor as monitor;
return { return {
name: instance[0], name: instance[0],
url: instance[1].uri, url: instance[1].uri,
uptime: monitor.uptime || 0, dailyRatios: instance[1].monitor.dailyRatios,
down: monitor.down ?? false, thirtyDayUptime: instance[1]?.monitor['30dRatio'].ratio,
created_at: monitor.created_at,
} }
}); })
// reliability and sanity checks // reliability and sanity checks
const reliableCheck = mapped const reliableCheck = mapped
.filter(instance => { .filter((instance) => {
const uptime = instance.uptime > 80 && !instance.down; // 30d uptime >= 90%
const nameIncluded = instance.url.includes(instance.name); const thirtyDayUptime = Number(instance.thirtyDayUptime) >= 90
const ninetyDays = 90 * 24 * 60 * 60 * 1000; // available for at least 80/90 days
const ninetyDaysAgo = new Date(Date.now() - ninetyDays); const dailyRatioCheck = instance.dailyRatios.filter(status => status.label !== "black")
const createdAt = new Date(instance.created_at).getTime() < ninetyDaysAgo.getTime(); return (thirtyDayUptime && dailyRatioCheck.length >= 80)
return uptime && nameIncluded && createdAt;
}) })
// url includes name
.filter(instance => instance.url.includes(instance.name))
export const getInvidiousList = (): string[] => // finally map to array
reliableCheck.map(instance => instance.name).sort() const result: string[] = reliableCheck.map(instance => instance.name)
writeFile(join(__dirname, "./invidiouslist.json"), JSON.stringify(result), (err) => {
if (err) return console.log(err);
})

View File

@@ -1,72 +0,0 @@
export type InvidiousInstance = [
string,
{
flag: string;
region: string;
stats: null | ivStats;
cors: null | boolean;
api: null | boolean;
type: "https" | "http" | "onion" | "i2p";
uri: string;
monitor: null | monitor;
}
]
export type monitor = {
token: string;
url: string;
alias: string;
last_status: number;
uptime: number;
down: boolean;
down_since: null | string;
up_since: null | string;
error: null | string;
period: number;
apdex_t: number;
string_match: string;
enabled: boolean;
published: boolean;
disabled_locations: string[];
recipients: string[];
last_check_at: string;
next_check_at: string;
created_at: string;
mute_until: null | string;
favicon_url: string;
custom_headers: Record<string, string>;
http_verb: string;
http_body: string;
ssl: {
tested_at: string;
expires_at: string;
valid: boolean;
error: null | string;
};
}
export type ivStats = {
version: string;
software: {
name: "invidious" | string;
version: string;
branch: "master" | string;
};
openRegistrations: boolean;
usage: {
users: {
total: number;
activeHalfyear: number;
activeMonth: number;
};
};
metadata: {
updatedAt: number;
lastChannelRefreshedAt: number;
};
playback: {
totalRequests: number;
successfulRequests: number;
ratio: number;
};
}

View File

@@ -1 +1 @@
["www.youtubekids.com","inv.nadeko.net","inv.tux.pizza","invidious.adminforge.de","invidious.jing.rocks","invidious.nerdvpn.de","invidious.perennialte.ch","invidious.privacyredirect.com","invidious.reallyaweso.me","invidious.yourdevice.ch","iv.ggtyler.dev","iv.nboeck.de","yewtu.be"] ["yewtu.be","invidious.snopyta.org","vid.puffyan.us","invidious.kavin.rocks","invidio.xamh.de","inv.riverside.rocks","invidious-us.kavin.rocks","invidious.osi.kr","tube.cthd.icu","yt.artemislena.eu","youtube.076.ne.jp","invidious.namazso.eu"]

View File

@@ -1,92 +0,0 @@
import * as data from "../ci/piped_instances.json";
type percent = string
type dailyMinutesDown = Record<string, number>
type PipedInstance = {
name: string;
url: string;
icon: string;
slug: string;
status: string;
uptime: percent;
uptimeDay: percent;
uptimeWeek: percent;
uptimeMonth: percent;
uptimeYear: percent;
time: number;
timeDay: number;
timeWeek: number;
timeMonth: number;
timeYear: number;
dailyMinutesDown: dailyMinutesDown
}
const percentNumber = (percent: percent) => Number(percent.replace("%", ""))
const ninetyDaysAgo = new Date(Date.now() - 90 * 24 * 60 * 60 * 1000)
function dailyMinuteFilter (dailyMinutesDown: dailyMinutesDown) {
let daysDown = 0
for (const [date, minsDown] of Object.entries(dailyMinutesDown)) {
if (new Date(date) >= ninetyDaysAgo && minsDown > 1000) { // if within 90 days and down for more than 1000 minutes
daysDown++
}
}
// return true f less than 10 days down
return daysDown < 10
}
const getHost = (url: string) => new URL(url).host
const getWatchPage = async (instance: PipedInstance) =>
fetch(`https://${getHost(instance.url)}`, { redirect: "manual" })
.then(res => res.headers.get("Location"))
.catch(e => { console.log (e); return null })
const siteOK = async (instance) => {
// check if entire site is redirect
const notRedirect = await fetch(instance.url, { redirect: "manual" })
.then(res => res.status == 200)
// only allow kavin to return piped.video
// if (instance.url.startsWith("https://piped.video") && instance.slug !== "kavin-rocks-official") return false
// check if frontend is OK
const watchPageStatus = await fetch(instance.frontendUrl)
.then(res => res.ok)
// test API - stream returns ok result
const streamStatus = await fetch(`${instance.apiUrl}/streams/BaW_jenozKc`)
.then(res => res.ok)
// get startTime of monitor
const age = await fetch(instance.historyUrl)
.then(res => res.text())
.then(text => { // startTime greater than 90 days ago
const date = text.match(/startTime: (.+)/)[1]
return Date.parse(date) < ninetyDaysAgo.valueOf()
})
// console.log(notRedirect, watchPageStatus, streamStatus, age, instance.frontendUrl, instance.apiUrl)
return notRedirect && watchPageStatus && streamStatus && age
}
const staticFilters = (data as PipedInstance[])
.filter(instance => {
const isup = instance.status === "up"
const monthCheck = percentNumber(instance.uptimeMonth) >= 90
const dailyMinuteCheck = dailyMinuteFilter(instance.dailyMinutesDown)
return isup && monthCheck && dailyMinuteCheck
})
.map(async instance => {
// get frontend url
const frontendUrl = await getWatchPage(instance)
if (!frontendUrl) return null // return false if frontend doesn't resolve
// get api base
const apiUrl = instance.url.replace("/healthcheck", "")
const historyUrl = `https://raw.githubusercontent.com/TeamPiped/piped-uptime/master/history/${instance.slug}.yml`
const pass = await siteOK({ apiUrl, historyUrl, frontendUrl, url: instance.url })
const frontendHost = getHost(frontendUrl)
return pass ? frontendHost : null
})
export async function getPipedList(): Promise<string[]> {
const instances = await Promise.all(staticFilters)
.then(arr => arr.filter(i => i !== null))
return instances
}

View File

@@ -1,6 +0,0 @@
import { writeFile } from 'fs';
import * as license from "../oss-attribution/licenseInfos.json";
const result = JSON.stringify(license, null, 2);
writeFile("../oss-attribution/licenseInfos.json", result, err => { if (err) return console.log(err) } );

View File

@@ -2,7 +2,7 @@
"serverAddress": "https://sponsor.ajay.app", "serverAddress": "https://sponsor.ajay.app",
"testingServerAddress": "https://sponsor.ajay.app/test", "testingServerAddress": "https://sponsor.ajay.app/test",
"serverAddressComment": "This specifies the default SponsorBlock server to connect to", "serverAddressComment": "This specifies the default SponsorBlock server to connect to",
"categoryList": ["sponsor", "selfpromo", "exclusive_access", "interaction", "poi_highlight", "intro", "outro", "preview", "hook", "filler", "chapter", "music_offtopic"], "categoryList": ["sponsor", "selfpromo", "exclusive_access", "interaction", "poi_highlight", "intro", "outro", "preview", "filler", "music_offtopic"],
"categorySupport": { "categorySupport": {
"sponsor": ["skip", "mute", "full"], "sponsor": ["skip", "mute", "full"],
"selfpromo": ["skip", "mute", "full"], "selfpromo": ["skip", "mute", "full"],
@@ -11,11 +11,9 @@
"intro": ["skip", "mute"], "intro": ["skip", "mute"],
"outro": ["skip", "mute"], "outro": ["skip", "mute"],
"preview": ["skip", "mute"], "preview": ["skip", "mute"],
"hook": ["skip", "mute"],
"filler": ["skip", "mute"], "filler": ["skip", "mute"],
"music_offtopic": ["skip"], "music_offtopic": ["skip"],
"poi_highlight": ["poi"], "poi_highlight": ["poi"]
"chapter": ["chapter"]
}, },
"wikiLinks": { "wikiLinks": {
"sponsor": "https://wiki.sponsor.ajay.app/w/Sponsor", "sponsor": "https://wiki.sponsor.ajay.app/w/Sponsor",
@@ -25,24 +23,10 @@
"intro": "https://wiki.sponsor.ajay.app/w/Intermission/Intro_Animation", "intro": "https://wiki.sponsor.ajay.app/w/Intermission/Intro_Animation",
"outro": "https://wiki.sponsor.ajay.app/w/Endcards/Credits", "outro": "https://wiki.sponsor.ajay.app/w/Endcards/Credits",
"preview": "https://wiki.sponsor.ajay.app/w/Preview/Recap", "preview": "https://wiki.sponsor.ajay.app/w/Preview/Recap",
"hook": "https://wiki.sponsor.ajay.app/w/Hook/Greetings", "filler": "https://wiki.sponsor.ajay.app/w/Filler_Tangent",
"filler": "https://wiki.sponsor.ajay.app/w/Tangents/Jokes",
"music_offtopic": "https://wiki.sponsor.ajay.app/w/Music:_Non-Music_Section", "music_offtopic": "https://wiki.sponsor.ajay.app/w/Music:_Non-Music_Section",
"poi_highlight": "https://wiki.sponsor.ajay.app/w/Highlight", "poi_highlight": "https://wiki.sponsor.ajay.app/w/Highlight",
"guidelines": "https://wiki.sponsor.ajay.app/w/Guidelines", "guidelines": "https://wiki.sponsor.ajay.app/w/Guidelines",
"mute": "https://wiki.sponsor.ajay.app/w/Mute_Segment", "mute": "https://wiki.sponsor.ajay.app/w/Mute_Segment"
"chapter": "https://wiki.sponsor.ajay.app/w/Chapter"
},
"extensionImportList": {
"chromium": [
"enamippconapkdmgfgjchkhakpfinmaj"
],
"firefox": [
"deArrow@ajay.app",
"deArrowBETA@ajay.app"
],
"safari": [
"app.ajay.dearrow.extension"
]
} }
} }

View File

@@ -5,5 +5,4 @@ module.exports = {
"transform": { "transform": {
"^.+\\.ts$": "ts-jest" "^.+\\.ts$": "ts-jest"
}, },
"reporters": ["default", "github-actions"]
}; };

View File

@@ -1,158 +1,8 @@
{ {
"host_permissions": [ "optional_permissions": [
"https://*.youtube.com/*", "declarativeContent"
"https://sponsor.ajay.app/*"
], ],
"optional_host_permissions": [
"*://*/*"
],
"web_accessible_resources": [{
"resources": [
"icons/LogoSponsorBlocker256px.png",
"icons/IconSponsorBlocker256px.png",
"icons/PlayerStartIconSponsorBlocker.svg",
"icons/PlayerStopIconSponsorBlocker.svg",
"icons/PlayerUploadIconSponsorBlocker.svg",
"icons/PlayerUploadFailedIconSponsorBlocker.svg",
"icons/PlayerCancelSegmentIconSponsorBlocker.svg",
"icons/clipboard.svg",
"icons/settings.svg",
"icons/pencil.svg",
"icons/check.svg",
"icons/check-smaller.svg",
"icons/upvote.png",
"icons/downvote.png",
"icons/thumbs_down.svg",
"icons/thumbs_down_locked.svg",
"icons/thumbs_up.svg",
"icons/help.svg",
"icons/report.png",
"icons/close.png",
"icons/skipIcon.svg",
"icons/refresh.svg",
"icons/beep.oga",
"icons/pause.svg",
"icons/stop.svg",
"icons/skip.svg",
"icons/heart.svg",
"icons/visible.svg",
"icons/not_visible.svg",
"icons/sort.svg",
"icons/money.svg",
"icons/segway.png",
"icons/close-smaller.svg",
"icons/right-arrow.svg",
"icons/campaign.svg",
"icons/star.svg",
"icons/lightbulb.svg",
"icons/bolt.svg",
"icons/stopwatch.svg",
"icons/music-note.svg",
"icons/import.svg",
"icons/export.svg",
"icons/PlayerInfoIconSponsorBlocker.svg",
"icons/PlayerDeleteIconSponsorBlocker.svg",
"icons/dearrow.svg",
"icons/sb-pride.png",
"icons/pride.svg",
"popup.html",
"popup.css",
"content.css",
"shared.css",
"js/document.js",
"libs/Source+Sans+Pro.css",
"libs/6xKydSBYKcSV-LCoeQqfX1RYOo3ig4vwlxdu.woff2",
"libs/6xKydSBYKcSV-LCoeQqfX1RYOo3ig4vwmRduz8A.woff2",
"libs/6xKydSBYKcSV-LCoeQqfX1RYOo3ig4vwmBduz8A.woff2",
"libs/6xKydSBYKcSV-LCoeQqfX1RYOo3ig4vwlBduz8A.woff2"
],
"matches": ["<all_urls>"]
}],
"content_scripts": [
{
"world": "MAIN",
"js": [
"./js/document.js"
],
"matches": [
"https://*.youtube.com/*",
"https://www.youtube-nocookie.com/embed/*"
],
"exclude_matches": [
"https://accounts.youtube.com/RotateCookiesPage*"
],
"all_frames": true,
"run_at": "document_start"
},
{
"world": "ISOLATED",
"js": [
"./js/content.js"
],
"css": [
"content.css",
"shared.css"
],
"matches": [
"https://*.youtube.com/*",
"https://www.youtube-nocookie.com/embed/*"
],
"exclude_matches": [
"https://accounts.youtube.com/RotateCookiesPage*"
],
"all_frames": true,
"run_at": "document_start"
}
],
"action": {
"default_title": "SponsorBlock",
"default_popup": "popup.html",
"default_icon": {
"16": "icons/IconSponsorBlocker16px.png",
"32": "icons/IconSponsorBlocker32px.png",
"64": "icons/IconSponsorBlocker64px.png",
"128": "icons/IconSponsorBlocker128px.png"
},
"theme_icons": [
{
"light": "icons/IconSponsorBlocker16px.png",
"dark": "icons/IconSponsorBlocker16px.png",
"size": 16
},
{
"light": "icons/IconSponsorBlocker32px.png",
"dark": "icons/IconSponsorBlocker32px.png",
"size": 32
},
{
"light": "icons/IconSponsorBlocker64px.png",
"dark": "icons/IconSponsorBlocker64px.png",
"size": 64
},
{
"light": "icons/IconSponsorBlocker128px.png",
"dark": "icons/IconSponsorBlocker128px.png",
"size": 128
},
{
"light": "icons/IconSponsorBlocker256px.png",
"dark": "icons/IconSponsorBlocker256px.png",
"size": 256
},
{
"light": "icons/IconSponsorBlocker512px.png",
"dark": "icons/IconSponsorBlocker512px.png",
"size": 512
},
{
"light": "icons/IconSponsorBlocker1024px.png",
"dark": "icons/IconSponsorBlocker1024px.png",
"size": 1024
}
]
},
"background": { "background": {
"service_worker": "./js/background.js" "persistent": false
}, }
"manifest_version": 3
} }

View File

@@ -1,17 +1,7 @@
{ {
"browser_specific_settings": { "browser_specific_settings": {
"gecko": { "gecko": {
"id": "sponsorBlocker@ajay.app", "id": "sponsorLockAprilFools@ajay.app"
"strict_min_version": "102.0"
},
"gecko_android": {
"strict_min_version": "113.0"
} }
},
"background": {
"persistent": false
},
"browser_action": {
"default_area": "navbar"
} }
} }

View File

@@ -1,138 +0,0 @@
{
"web_accessible_resources": [
"icons/LogoSponsorBlocker256px.png",
"icons/IconSponsorBlocker256px.png",
"icons/PlayerStartIconSponsorBlocker.svg",
"icons/PlayerStopIconSponsorBlocker.svg",
"icons/PlayerUploadIconSponsorBlocker.svg",
"icons/PlayerUploadFailedIconSponsorBlocker.svg",
"icons/PlayerCancelSegmentIconSponsorBlocker.svg",
"icons/clipboard.svg",
"icons/settings.svg",
"icons/pencil.svg",
"icons/check.svg",
"icons/check-smaller.svg",
"icons/upvote.png",
"icons/downvote.png",
"icons/thumbs_down.svg",
"icons/thumbs_down_locked.svg",
"icons/thumbs_up.svg",
"icons/help.svg",
"icons/report.png",
"icons/close.png",
"icons/skipIcon.svg",
"icons/refresh.svg",
"icons/beep.oga",
"icons/pause.svg",
"icons/stop.svg",
"icons/skip.svg",
"icons/heart.svg",
"icons/visible.svg",
"icons/not_visible.svg",
"icons/sort.svg",
"icons/money.svg",
"icons/segway.png",
"icons/close-smaller.svg",
"icons/right-arrow.svg",
"icons/campaign.svg",
"icons/star.svg",
"icons/lightbulb.svg",
"icons/bolt.svg",
"icons/stopwatch.svg",
"icons/music-note.svg",
"icons/import.svg",
"icons/export.svg",
"icons/PlayerInfoIconSponsorBlocker.svg",
"icons/PlayerDeleteIconSponsorBlocker.svg",
"icons/dearrow.svg",
"icons/sb-pride.png",
"icons/pride.svg",
"popup.html",
"popup.css",
"content.css",
"shared.css",
"js/document.js",
"libs/Source+Sans+Pro.css",
"libs/6xKydSBYKcSV-LCoeQqfX1RYOo3ig4vwlxdu.woff2",
"libs/6xKydSBYKcSV-LCoeQqfX1RYOo3ig4vwmRduz8A.woff2",
"libs/6xKydSBYKcSV-LCoeQqfX1RYOo3ig4vwmBduz8A.woff2",
"libs/6xKydSBYKcSV-LCoeQqfX1RYOo3ig4vwlBduz8A.woff2"
],
"permissions": [
"https://sponsor.ajay.app/*"
],
"optional_permissions": [
"*://*/*"
],
"browser_action": {
"default_title": "SponsorBlock",
"default_popup": "popup.html",
"default_icon": {
"16": "icons/IconSponsorBlocker16px.png",
"32": "icons/IconSponsorBlocker32px.png",
"64": "icons/IconSponsorBlocker64px.png",
"128": "icons/IconSponsorBlocker128px.png"
},
"theme_icons": [
{
"light": "icons/IconSponsorBlocker16px.png",
"dark": "icons/IconSponsorBlocker16px.png",
"size": 16
},
{
"light": "icons/IconSponsorBlocker32px.png",
"dark": "icons/IconSponsorBlocker32px.png",
"size": 32
},
{
"light": "icons/IconSponsorBlocker64px.png",
"dark": "icons/IconSponsorBlocker64px.png",
"size": 64
},
{
"light": "icons/IconSponsorBlocker128px.png",
"dark": "icons/IconSponsorBlocker128px.png",
"size": 128
},
{
"light": "icons/IconSponsorBlocker256px.png",
"dark": "icons/IconSponsorBlocker256px.png",
"size": 256
},
{
"light": "icons/IconSponsorBlocker512px.png",
"dark": "icons/IconSponsorBlocker512px.png",
"size": 512
},
{
"light": "icons/IconSponsorBlocker1024px.png",
"dark": "icons/IconSponsorBlocker1024px.png",
"size": 1024
}
]
},
"background": {
"scripts":[
"./js/background.js"
]
},
"content_scripts": [{
"run_at": "document_start",
"matches": [
"https://*.youtube.com/*",
"https://www.youtube-nocookie.com/embed/*"
],
"exclude_matches": [
"https://accounts.youtube.com/RotateCookiesPage*"
],
"all_frames": true,
"js": [
"./js/content.js"
],
"css": [
"content.css",
"shared.css"
]
}],
"manifest_version": 2
}

View File

@@ -1,26 +1,89 @@
{ {
"name": "__MSG_fullName__", "name": "SponsorLock - Give Back Control!",
"short_name": "SponsorBlock", "short_name": "SponsorLock",
"version": "6.0.2", "version": "4.2.1",
"default_locale": "en", "default_locale": "en",
"description": "__MSG_Description__", "description": "SponsorLock only shows you promotion, and skips all useful informaton.",
"homepage_url": "https://sponsor.ajay.app", "homepage_url": "https://sponsor.ajay.app",
"icons": { "content_scripts": [{
"16": "icons/IconSponsorBlocker16px.png", "run_at": "document_start",
"32": "icons/IconSponsorBlocker32px.png", "matches": [
"64": "icons/IconSponsorBlocker64px.png", "https://*.youtube.com/*",
"128": "icons/IconSponsorBlocker128px.png", "https://www.youtube-nocookie.com/embed/*"
"256": "icons/IconSponsorBlocker256px.png", ],
"512": "icons/IconSponsorBlocker512px.png", "all_frames": true,
"1024": "icons/IconSponsorBlocker1024px.png" "js": [
}, "./js/vendor.js",
"./js/content.js"
],
"css": [
"content.css",
"./libs/Source+Sans+Pro.css",
"popup.css"
]
}],
"web_accessible_resources": [
"icons/LogoSponsorBlocker256px.png",
"icons/IconSponsorBlocker256px.png",
"icons/PlayerStartIconSponsorBlocker.svg",
"icons/PlayerStopIconSponsorBlocker.svg",
"icons/PlayerUploadIconSponsorBlocker.svg",
"icons/PlayerUploadFailedIconSponsorBlocker.svg",
"icons/PlayerCancelSegmentIconSponsorBlocker.svg",
"icons/clipboard.svg",
"icons/settings.svg",
"icons/pencil.svg",
"icons/check.svg",
"icons/upvote.png",
"icons/downvote.png",
"icons/thumbs_down.svg",
"icons/thumbs_down_locked.svg",
"icons/thumbs_up.svg",
"icons/help.svg",
"icons/report.png",
"icons/close.png",
"icons/skipIcon.svg",
"icons/refresh.svg",
"icons/beep.ogg",
"icons/pause.svg",
"icons/stop.svg",
"icons/heart.svg",
"icons/visible.svg",
"icons/not_visible.svg",
"icons/PlayerInfoIconSponsorBlocker.svg",
"icons/PlayerDeleteIconSponsorBlocker.svg",
"popup.html",
"content.css"
],
"permissions": [ "permissions": [
"storage", "storage",
"scripting", "https://sponsor.ajay.app/*"
"unlimitedStorage"
], ],
"optional_permissions": [
"*://*/*"
],
"browser_action": {
"default_title": "SponsorBlock",
"default_popup": "popup.html"
},
"background": {
"scripts":[
"./js/vendor.js",
"./js/background.js"
]
},
"icons": {
"16": "icons/LogoSponsorBlocker64px.png",
"32": "icons/LogoSponsorBlocker64px.png",
"64": "icons/LogoSponsorBlocker64px.png",
"128": "icons/LogoSponsorBlocker128px.png",
"256": "icons/LogoSponsorBlocker256px.png",
"512": "icons/LogoSponsorBlocker512px.png",
"1024": "icons/LogoSponsorBlocker1024px.png"
},
"options_ui": { "options_ui": {
"page": "options/options.html", "page": "options/lock-options.html",
"open_in_tab": true "open_in_tab": true
} },
"manifest_version": 2
} }

View File

@@ -1,16 +1,5 @@
{ {
"background": { "background": {
"persistent": false "persistent": false
},
"optional_permissions": [
"webNavigation"
],
"browser_action": {
"default_icon": {
"16": "icons/SafariIconSponsorBlocker16px.png",
"32": "icons/SafariIconSponsorBlocker32px.png",
"64": "icons/SafariIconSponsorBlocker64px.png",
"128": "icons/SafariIconSponsorBlocker128px.png"
}
} }
} }

Submodule maze-utils deleted from 04ddfb9be1

File diff suppressed because one or more lines are too long

20016
package-lock.json generated

File diff suppressed because it is too large Load Diff

View File

@@ -4,48 +4,40 @@
"description": "", "description": "",
"main": "background.js", "main": "background.js",
"dependencies": { "dependencies": {
"content-scripts-register-polyfill": "^4.0.2", "react": "^17.0.2",
"react": "^18.2.0", "react-dom": "^17.0.2"
"react-dom": "^18.2.0"
},
"overrides": {
"content-scripts-register-polyfill": {
"webext-content-scripts": "v2.5.5"
}
}, },
"devDependencies": { "devDependencies": {
"@types/chrome": "^0.0.220", "@types/chrome": "^0.0.178",
"@types/firefox-webext-browser": "^111.0.0", "@types/firefox-webext-browser": "^94.0.1",
"@types/jest": "^29.4.0", "@types/jest": "^27.4.0",
"@types/react": "^18.0.28", "@types/wicg-mediasession": "^1.1.3",
"@types/react-dom": "^18.0.11", "@types/react": "^17.0.39",
"@types/selenium-webdriver": "^4.1.13", "@types/react-dom": "^17.0.11",
"@types/wicg-mediasession": "^1.1.4", "@types/selenium-webdriver": "^4.0.17",
"@typescript-eslint/eslint-plugin": "^5.54.1", "@typescript-eslint/eslint-plugin": "^5.10.2",
"@typescript-eslint/parser": "^5.54.1", "@typescript-eslint/parser": "^5.10.2",
"chromedriver": "^137.0.0", "chromedriver": "^97.0.4",
"concurrently": "^7.6.0", "concurrently": "^7.0.0",
"copy-webpack-plugin": "^11.0.0", "copy-webpack-plugin": "^10.2.4",
"eslint": "^8.35.0", "eslint": "^8.8.0",
"eslint-plugin-react": "^7.32.2", "eslint-plugin-react": "^7.28.0",
"fork-ts-checker-webpack-plugin": "^7.3.0", "jest": "^27.5.0",
"jest": "^29.5.0", "rimraf": "^3.0.2",
"jest-environment-jsdom": "^29.5.0",
"rimraf": "^4.3.1",
"schema-utils": "^4.0.0", "schema-utils": "^4.0.0",
"selenium-webdriver": "^4.8.1", "selenium-webdriver": "^4.1.1",
"ts-jest": "^29.0.5", "ts-jest": "^27.1.3",
"ts-loader": "^9.4.2", "ts-loader": "^9.2.6",
"ts-node": "^10.9.1", "ts-node": "^10.4.0",
"typescript": "4.9", "typescript": "4.5",
"web-ext": "^8.10.0", "web-ext": "^6.6.0",
"webpack": "^5.94.0", "webpack": "^5.68.0",
"webpack-cli": "^4.10.0", "webpack-cli": "^4.9.2",
"webpack-merge": "^5.8.0" "webpack-merge": "^4.2.2"
}, },
"scripts": { "scripts": {
"web-run": "npm run web-run:chrome", "web-run": "npm run web-run:chrome",
"web-sign": "web-ext sign --channel unlisted -s dist", "web-sign": "web-ext sign -s dist",
"web-run:firefox": "cd dist && web-ext run --start-url https://addons.mozilla.org/firefox/addon/ublock-origin/", "web-run:firefox": "cd dist && web-ext run --start-url https://addons.mozilla.org/firefox/addon/ublock-origin/",
"web-run:firefox-android": "cd dist && web-ext run -t firefox-android --firefox-apk org.mozilla.fenix", "web-run:firefox-android": "cd dist && web-ext run -t firefox-android --firefox-apk org.mozilla.fenix",
"web-run:chrome": "cd dist && web-ext run --start-url https://chrome.google.com/webstore/detail/ublock-origin/cjpalhdlnbpafiamejdnhcphjbkeiagm -t chromium", "web-run:chrome": "cd dist && web-ext run --start-url https://chrome.google.com/webstore/detail/ublock-origin/cjpalhdlnbpafiamejdnhcphjbkeiagm -t chromium",
@@ -60,7 +52,7 @@
"build:watch": "npm run build:watch:chrome", "build:watch": "npm run build:watch:chrome",
"build:watch:chrome": "webpack --env browser=chrome --config webpack/webpack.dev.js --watch", "build:watch:chrome": "webpack --env browser=chrome --config webpack/webpack.dev.js --watch",
"build:watch:firefox": "webpack --env browser=firefox --config webpack/webpack.dev.js --watch", "build:watch:firefox": "webpack --env browser=firefox --config webpack/webpack.dev.js --watch",
"ci:invidious": "ts-node ci/generateList.ts", "ci:invidious": "ts-node ci/invidiousCI.ts",
"dev": "npm run build:dev && concurrently \"npm run web-run\" \"npm run build:watch\"", "dev": "npm run build:dev && concurrently \"npm run web-run\" \"npm run build:watch\"",
"dev:firefox": "npm run build:dev:firefox && concurrently \"npm run web-run:firefox\" \"npm run build:watch:firefox\"", "dev:firefox": "npm run build:dev:firefox && concurrently \"npm run web-run:firefox\" \"npm run build:watch:firefox\"",
"dev:firefox-android": "npm run build:dev:firefox && concurrently \"npm run web-run:firefox-android\" \"npm run build:watch:firefox\"", "dev:firefox-android": "npm run build:dev:firefox && concurrently \"npm run web-run:firefox-android\" \"npm run build:watch:firefox\"",
@@ -71,31 +63,26 @@
"lint:fix": "eslint src --fix" "lint:fix": "eslint src --fix"
}, },
"engines": { "engines": {
"node": ">=16" "node": ">=12.20.0"
}, },
"funding": [ "funding": [{
{
"type": "individual", "type": "individual",
"url": "https://sponsor.ajay.app/donate" "url": "hhttps://sponsor.ajay.app/donate"
}, }, {
{
"type": "github", "type": "github",
"url": "https://github.com/sponsors/ajayyy-org" "url": "https://github.com/sponsors/ajayyy-org"
}, }, {
{
"type": "patreon", "type": "patreon",
"url": "https://www.patreon.com/ajayyy" "url": "https://www.patreon.com/ajayyy"
}, }, {
{
"type": "individual", "type": "individual",
"url": "https://paypal.me/ajayyy" "url": "https://paypal.me/ajayyy"
} }],
],
"repository": { "repository": {
"type": "git", "type": "git",
"url": "git+https://github.com/ajayyy/SponsorBlock.git" "url": "git+https://github.com/ajayyy/SponsorBlock.git"
}, },
"author": "Ajay Ramachandran", "author": "Ajay Ramachandran",
"license": "GPL-3.0", "license": "LGPL-3.0-or-later",
"private": true "private": true
} }

Submodule public/_locales deleted from daa96aa537

View File

@@ -0,0 +1,933 @@
{
"fullName": {
"message": "SponsorBlock for YouTube - Skip Sponsorships",
"description": "Name of the extension."
},
"Description": {
"message": "Skip sponsorships, subscription begging and more on YouTube videos. Report sponsors on videos you watch to save others' time.",
"description": "Description of the extension."
},
"400": {
"message": "Server said this request was invalid"
},
"429": {
"message": "You have submitted too many sponsor times for this one video, are you sure there are this many?"
},
"409": {
"message": "This has already been submitted before"
},
"channelWhitelisted": {
"message": "Channel Whitelisted!"
},
"Segment": {
"message": "segment"
},
"Segments": {
"message": "segments"
},
"upvoteButtonInfo": {
"message": "Upvote this submission"
},
"reportButtonTitle": {
"message": "Report"
},
"reportButtonInfo": {
"message": "Report this submission as incorrect."
},
"Dismiss": {
"message": "Dismiss"
},
"Loading": {
"message": "Loading..."
},
"Hide": {
"message": "Never Show"
},
"hitGoBack": {
"message": "Hit unskip to get to where you came from."
},
"unskip": {
"message": "Unskip"
},
"reskip": {
"message": "Reskip"
},
"unmute": {
"message": "Unmute"
},
"paused": {
"message": "Paused"
},
"manualPaused": {
"message": "Timer Stopped"
},
"confirmMSG": {
"message": "To edit or delete individual values, click the info button or open the extension popup by clicking the extension icon in the top right corner."
},
"clearThis": {
"message": "Are you sure you want to clear this?\n\n"
},
"Unknown": {
"message": "There was an error submitting your sponsor times, please try again later."
},
"sponsorFound": {
"message": "This video has segments in the database!"
},
"sponsor404": {
"message": "No segments found"
},
"sponsorStart": {
"message": "Segment Starts Now"
},
"sponsorEnd": {
"message": "Segment Ends Now"
},
"sponsorCancel": {
"message": "Cancel Creating Segment"
},
"noVideoID": {
"message": "No YouTube video found.\nIf this is incorrect, refresh the tab."
},
"refreshSegments": {
"message": "Refresh segments"
},
"success": {
"message": "Success!"
},
"voted": {
"message": "Voted!"
},
"serverDown": {
"message": "It seems the server is down. Contact the dev immediately."
},
"connectionError": {
"message": "A connection error has occured. Error code: "
},
"clearTimes": {
"message": "Clear Segments"
},
"openPopup": {
"message": "Open SponsorBlock Popup"
},
"closePopup": {
"message": "Close Popup"
},
"SubmitTimes": {
"message": "Submit Segments"
},
"submitCheck": {
"message": "Are you sure you want to submit this?"
},
"whitelistChannel": {
"message": "Whitelist channel"
},
"removeFromWhitelist": {
"message": "Remove channel from whitelist"
},
"voteOnTime": {
"message": "Vote On A Segment"
},
"Submissions": {
"message": "Submissions"
},
"savedPeopleFrom": {
"message": "You've saved people from "
},
"viewLeaderboard": {
"message": "Leaderboard"
},
"recordTimesDescription": {
"message": "Submit"
},
"submissionEditHint": {
"message": "Section editing will appear after you click submit",
"description": "Appears in the popup to inform them that editing has been moved to the video player."
},
"popupHint": {
"message": "Hint: You can setup keybinds for submitting in the options"
},
"clearTimesButton": {
"message": "Clear Times"
},
"submitTimesButton": {
"message": "Submit Times"
},
"publicStats": {
"message": "This is used on the public stats page to show off how much you've contributed. See it"
},
"Username": {
"message": "Username"
},
"setUsername": {
"message": "Set Username"
},
"copyPublicID": {
"message": "Copy Public UserID"
},
"discordAdvert": {
"message": "Come join the official discord server to give suggestions and feedback!"
},
"hideThis": {
"message": "Hide this"
},
"Options": {
"message": "Options"
},
"showButtons": {
"message": "Show Buttons On YouTube Player"
},
"hideButtons": {
"message": "Hide Buttons On YouTube Player"
},
"hideButtonsDescription": {
"message": "This hides the buttons that appear on the YouTube player to submit skip segments."
},
"showSkipButton": {
"message": "Keep Skip To Highlight Button On Player"
},
"showInfoButton": {
"message": "Show Info Button On YouTube Player"
},
"hideInfoButton": {
"message": "Hide Info Button On YouTube Player"
},
"autoHideInfoButton": {
"message": "Auto-hide Info Button"
},
"hideDeleteButton": {
"message": "Hide Delete Button On YouTube Player"
},
"showDeleteButton": {
"message": "Show Delete Button On YouTube Player"
},
"enableViewTracking": {
"message": "Enable Skip Count Tracking"
},
"whatViewTracking": {
"message": "This feature tracks which segments you have skipped to let users know how much their submission has helped others and used as a metric along with upvotes to ensure that spam doesn't get into the database. The extension sends a message to the server each time you skip a segment. Hopefully most people don't change this setting so that the view numbers are accurate. :)"
},
"enableViewTrackingInPrivate": {
"message": "Enable Skip Count Tracking In Private/Incognito tabs"
},
"enableTrackDownvotes": {
"message": "Store segment downvotes"
},
"whatTrackDownvotes": {
"message": "Any segments you downvote will remain hidden even after refreshing"
},
"trackDownvotesWarning": {
"message": "Warning: Disabling this will delete all previously stored downvotes"
},
"enableQueryByHashPrefix": {
"message": "Query By Hash Prefix"
},
"whatQueryByHashPrefix": {
"message": "Instead of requesting segments from the server using the videoID, the first 4 characters of the hash of the videoID are sent. This server will send back data for all videos with similar hashes."
},
"enableRefetchWhenNotFound": {
"message": "Refetch Segments On New Videos"
},
"whatRefetchWhenNotFound": {
"message": "If the video is new, and there are no segments found, it will keep refetching every few minutes while you watch."
},
"showNotice": {
"message": "Show Notice Again"
},
"showSkipNotice": {
"message": "Show Notice After A Segment Is Skipped"
},
"noticeVisibilityMode0": {
"message": "Full Size Skip Notices"
},
"noticeVisibilityMode1": {
"message": "Small Skip Notices for Auto Skip"
},
"noticeVisibilityMode2": {
"message": "All Small Skip Notices"
},
"noticeVisibilityMode3": {
"message": "Faded Skip Notices for Auto Skip"
},
"noticeVisibilityMode4": {
"message": "All Faded Skip Notices"
},
"longDescription": {
"message": "SponsorBlock lets you skip over sponsors, intros, outros, subscription reminders, and other annoying parts of YouTube videos. SponsorBlock is a crowdsourced browser extension that lets anyone submit the start and end times of sponsored segments and other segments of YouTube videos. Once one person submits this information, everyone else with this extension will skip right over the sponsored segment. You can also skip over non music sections of music videos.",
"description": "Full description of the extension on the store pages."
},
"website": {
"message": "Website",
"description": "Used on Firefox Store Page"
},
"sourceCode": {
"message": "Source Code",
"description": "Used on Firefox Store Page"
},
"noticeUpdate": {
"message": "The notice has been upgraded!",
"description": "The first line of the message displayed after the notice was upgraded."
},
"noticeUpdate2": {
"message": "If you still don't like it, hit the never show button.",
"description": "The second line of the message displayed after the notice was upgraded."
},
"setSkipShortcut": {
"message": "Skip segment",
"description": "Keybind label"
},
"setStartSponsorShortcut": {
"message": "Start/stop segment",
"description": "Keybind label"
},
"setSubmitKeybind": {
"message": "Submit segments",
"description": "Keybind label"
},
"keybindDescription": {
"message": "Select a key by typing it and choose any modifier keys you wish to use."
},
"0": {
"message": "Connection Timeout. Check your internet connection. If your internet is working, the server is probably overloaded or down."
},
"disableSkipping": {
"message": "Skipping is enabled"
},
"enableSkipping": {
"message": "Skipping is disabled"
},
"yourWork": {
"message": "Your Work",
"description": "Used to describe the section that will show you the statistics from your submissions."
},
"502": {
"message": "The server seems to be overloaded. Try again in a few seconds."
},
"errorCode": {
"message": "Error Code: "
},
"skip": {
"message": "Skip"
},
"mute": {
"message": "Mute"
},
"full": {
"message": "Full Video",
"description": "Used for the name of the option to label an entire video as sponsor or self promotion."
},
"skip_category": {
"message": "Skip {0}?"
},
"mute_category": {
"message": "Mute {0}?"
},
"skip_to_category": {
"message": "Skip to {0}?",
"description": "Used for skipping to things (Skip to Highlight)"
},
"skipped": {
"message": "{0} Skipped",
"description": "Example: Sponsor Skipped"
},
"muted": {
"message": "{0} Muted",
"description": "Example: Sponsor Muted"
},
"skipped_to_category": {
"message": "Skipped to {0}",
"description": "Used for skipping to things (Skipped to Highlight)"
},
"disableAutoSkip": {
"message": "Disable Auto Skip"
},
"enableAutoSkip": {
"message": "Enable Auto Skip"
},
"audioNotification": {
"message": "Audio Notification On Skip"
},
"audioNotificationDescription": {
"message": "Audio notification on skip will play a sound whenever a segment is skipped. If disabled (or auto skip is disabled), no sound will be played."
},
"showTimeWithSkips": {
"message": "Show Time With Skips Removed"
},
"showTimeWithSkipsDescription": {
"message": "This time appears in brackets next to the current time on below the seekbar. This shows the total video duration minus any segments. This includes segments marked as only \"Show In Seekbar\"."
},
"youHaveSkipped": {
"message": "You've skipped "
},
"minLower": {
"message": "minute"
},
"minsLower": {
"message": "minutes"
},
"hourLower": {
"message": "hour"
},
"hoursLower": {
"message": "hours"
},
"youHaveSavedTime": {
"message": "You've saved people",
"description": "You've saved people from 887,362 segments (236d 15h 5.3 minutes of their lives)."
},
"youHaveSavedTimeEnd": {
"message": " of their lives",
"description": "You've saved people from 887,362 segments (236d 15h 5.3 minutes of their lives)."
},
"statusReminder": {
"message": "Check status.sponsor.ajay.app for server status."
},
"changeUserID": {
"message": "Import/Export Your UserID"
},
"whatChangeUserID": {
"message": "This should be kept private. This is like a password and should not be shared with anyone. If someone has this, they can impersonate you. If you are looking for your public userID, click the clipboard icon in the popup."
},
"setUserID": {
"message": "Set UserID"
},
"userIDChangeWarning": {
"message": "Warning: Changing the UserID is permanent. Are you sure you would like to do this? Make sure to backup your old one just in case."
},
"createdBy": {
"message": "Created By"
},
"supportOtherSites": {
"message": "Support 3rd Party YouTube-Sites"
},
"supportOtherSitesDescription": {
"message": "Support third party YouTube clients. To enable support, you must accept the extra permissions. This does NOT work in incognito on Chrome and other Chromium variants.",
"description": "This replaces the 'supports Invidious' option because it now works on other YouTube sites such as Cloudtube"
},
"supportedSites": {
"message": "Supported Sites: "
},
"optionsInfo": {
"message": "Enable Invidious support, disable autoskip, hide buttons and more."
},
"addInvidiousInstance": {
"message": "Add 3rd-Party Client Instance"
},
"addInvidiousInstanceDescription": {
"message": "Add a custom instance. This must be formatted with JUST the domain. Example: invidious.ajay.app"
},
"add": {
"message": "Add"
},
"addInvidiousInstanceError": {
"message": "This is an invalid domain. This should JUST include the domain part. Example: invidious.ajay.app"
},
"resetInvidiousInstance": {
"message": "Reset Invidious Instance List"
},
"resetInvidiousInstanceAlert": {
"message": "You are about to reset the Invidious instance list"
},
"currentInstances": {
"message": "Current Instances:"
},
"minDuration": {
"message": "Minimum duration (seconds):"
},
"minDurationDescription": {
"message": "Segments shorter than the set value will not be skipped or show in the player."
},
"skipNoticeDuration": {
"message": "Skip notice duration (seconds):"
},
"skipNoticeDurationDescription": {
"message": "The skip notice will stay on screen for at least this many seconds. For manual skipping, it may be visible for longer."
},
"shortCheck": {
"message": "The following submission is shorter than your minimum duration option. This could mean that this is already submitted, and just being ignored due to this option. Are you sure you would like to submit?"
},
"liveOrPremiere": {
"message": "Submitting on an active livestream or premiere is not allowed. Please wait until it finishes, then refresh the page and verify that the segments are still valid."
},
"showUploadButton": {
"message": "Show Upload Button"
},
"customServerAddress": {
"message": "SponsorBlock Server Address"
},
"customServerAddressDescription": {
"message": "The address SponsorBlock uses to make calls to the server.\nUnless you have your own server instance, this should not be changed."
},
"save": {
"message": "Save"
},
"reset": {
"message": "Reset"
},
"customAddressError": {
"message": "This address is not in the right form. Make sure you have http:// or https:// at the beginning and no trailing slashes."
},
"areYouSureReset": {
"message": "Are you sure you would like to reset this?"
},
"mobileUpdateInfo": {
"message": "m.youtube.com is now supported"
},
"exportOptions": {
"message": "Import/Export All Options"
},
"exportOptionsCopy": {
"message": "Edit/copy"
},
"exportOptionsDownload": {
"message": "Save to file"
},
"exportOptionsUpload": {
"message": "Load from file"
},
"whatExportOptions": {
"message": "This is your entire configuration in JSON. This includes your userID, so be sure to share this wisely."
},
"setOptions": {
"message": "Set Options"
},
"exportOptionsWarning": {
"message": "Warning: Changing the options is permanent and can break your install. Are you sure you would like to do this? Make sure to backup your old one just in case."
},
"incorrectlyFormattedOptions": {
"message": "This JSON is not formatted correctly. Your options have not been changed."
},
"confirmNoticeTitle" : {
"message": "Submit Segment"
},
"submit": {
"message": "Submit"
},
"cancel": {
"message": "Cancel"
},
"delete": {
"message": "Delete"
},
"preview": {
"message": "Preview"
},
"unsubmitted": {
"message": "Unsubmitted"
},
"inspect": {
"message": "Inspect"
},
"edit": {
"message": "Edit"
},
"copyDebugInformation": {
"message": "Copy Debug Information To Clipboard"
},
"copyDebugInformationFailed": {
"message": "Failed to write to clipboard"
},
"copyDebugInformationOptions": {
"message": "Copies information to the clipboard to be provided to a developer when raising a bug / when a developer requests it. Sensitive information such as your user ID, whitelisted channels, and custom server address have been removed. However it does contain information such as your useragent, browser, operating system, and extension version number. "
},
"copyDebugInformationComplete": {
"message": "The debug information has been copied to the clip board. Feel free to remove any information you would rather not share. Save this in a text file or paste into the bug report."
},
"keyAlreadyUsed": {
"message": "This shortcut is bound to another action. Please select a different one."
},
"to": {
"message": "to",
"description": "Used between segments. Example: 1:20 to 1:30"
},
"category_sponsor": {
"message": "Useful Content"
},
"category_sponsor_description": {
"message": "Paid promotion, paid referrals and direct advertisements. Not for self-promotion or free shoutouts to causes/creators/websites/products they like."
},
"category_selfpromo": {
"message": "Unpaid/Self Promotion"
},
"category_selfpromo_description": {
"message": "Similar to \"sponsor\" except for unpaid or self promotion. This includes sections about merchandise, donations, or information about who they collaborated with."
},
"category_exclusive_access": {
"message": "Exclusive Access"
},
"category_exclusive_access_description": {
"message": "Only for labeling entire videos. Used when a video showcases a product, service or location that they've received free or subsidized access to."
},
"category_exclusive_access_pill": {
"message": "This video showcases a product, service or location that they've received free or subsidized access to",
"description": "Short description for this category"
},
"category_interaction": {
"message": "Interaction Reminder (Subscribe)"
},
"category_interaction_description": {
"message": "When there is a short reminder to like, subscribe or follow them in the middle of content. If it is long or about something specific, it should be under self promotion instead."
},
"category_interaction_short": {
"message": "Interaction Reminder"
},
"category_intro": {
"message": "Intermission/Intro Animation"
},
"category_intro_description": {
"message": "An interval without actual content. Could be a pause, static frame, repeating animation. This should not be used for transitions containing information."
},
"category_intro_short": {
"message": "Intermission"
},
"category_outro": {
"message": "Endcards/Credits"
},
"category_outro_description": {
"message": "Credits or when the YouTube endcards appear. Not for conclusions with information."
},
"category_preview": {
"message": "Preview/Recap"
},
"category_preview_description": {
"message": "Quick recap of previous episodes, or a preview of what's coming up later in the current video. Meant for edited together clips, not for spoken summaries."
},
"category_filler": {
"message": "Filler Tangent/Jokes"
},
"category_filler_description": {
"message": "Tangential scenes added only for filler or humor that are not required to understand the main content of the video. This should not include segments providing context or background details."
},
"category_filler_short": {
"message": "Filler"
},
"category_music_offtopic": {
"message": "Music: Non-Music Section"
},
"category_music_offtopic_description": {
"message": "Only for use in music videos. This only should be used for sections of music videos that aren't already covered by another category."
},
"category_music_offtopic_short": {
"message": "Non-Music"
},
"category_poi_highlight": {
"message": "Highlight"
},
"category_poi_highlight_description": {
"message": "The part of the video that most people are looking for. Similar to \"Video starts at x\" comments."
},
"category_livestream_messages": {
"message": "Livestream: Donation/Message Readings"
},
"category_livestream_messages_short": {
"message": "Message Reading"
},
"autoSkip": {
"message": "Auto Skip"
},
"manualSkip": {
"message": "Manual Skip"
},
"showOverlay": {
"message": "Show In Seek Bar"
},
"disable": {
"message": "Disable"
},
"autoSkip_POI": {
"message": "Auto skip to the start"
},
"manualSkip_POI": {
"message": "Ask when video loads"
},
"showOverlay_POI": {
"message": "Show In Seek Bar"
},
"showOverlay_full": {
"message": "Show Label"
},
"autoSkipOnMusicVideos": {
"message": "Auto skip all segments when there is a non-music segment"
},
"muteSegments": {
"message": "Allow segments that mute audio instead of skip"
},
"fullVideoSegments": {
"message": "Show an icon when a video is entirely an advertisement",
"description": "Referring to the category pill that is now shown on videos that are entirely sponsor or entirely selfpromo"
},
"previewColor": {
"message": "Unsubmitted Color",
"description": "Referring to submissions that have not been sent to the server yet."
},
"seekBarColor": {
"message": "Seek Bar Color"
},
"category": {
"message": "Category"
},
"skipOption": {
"message": "Skip Option",
"description": "Used on the options page to describe the ways to skip the segment (auto skip, manual, etc.)"
},
"enableTestingServer": {
"message": "Enable Beta Testing Server"
},
"whatEnableTestingServer": {
"message": "Your submissions and votes WILL NOT COUNT towards the main server. Only use this for testing."
},
"testingServerWarning": {
"message": "All submissions and votes WILL NOT COUNT towards the main server while connecting to the test server. Make sure to disable this when you want to make real submissions."
},
"bracketNow": {
"message": "(Now)"
},
"moreCategories": {
"message": "More Categories"
},
"chooseACategory": {
"message": "Choose a Category"
},
"enableThisCategoryFirst": {
"message": "To submit segments with the category of \"{0}\", you must enable it in the options. You will be redirected to the options now.",
"description": "Used when submitting segments to only let them select a certain category if they have it enabled in the options."
},
"poiOnlyOneSegment": {
"message": "Warning: This type of segment can have a maximum of one active at a time. Submitting multiple will cause a random one to be shown."
},
"youMustSelectACategory": {
"message": "You must select a category for all segments you are submitting!"
},
"bracketEnd": {
"message": "(End)"
},
"hiddenDueToDownvote": {
"message": "hidden: downvote"
},
"hiddenDueToDuration": {
"message": "hidden: too short"
},
"manuallyHidden": {
"message": "manually hidden"
},
"channelDataNotFound": {
"description": "This error appears in an alert when they try to whitelist a channel and the extension is unable to determine what channel they are looking at.",
"message": "Channel ID is not loaded yet. If you are using an embedded video, try using the YouTube homepage instead. This could also be caused by changes in the YouTube layout, if you think so, make a comment here:"
},
"videoInfoFetchFailed": {
"message": "It seems that something is blocking SponsorBlock's ability to get video data. Please see https://github.com/ajayyy/SponsorBlock/issues/741 for more info."
},
"youtubePermissionRequest": {
"message": "It seems that SponsorBlock is unable to reach the YouTube API. To fix this, accept the permission prompt that will appear next, wait a few seconds, and then reload the page."
},
"acceptPermission": {
"message": "Accept permission"
},
"permissionRequestSuccess": {
"message": "Permission request succeeded!"
},
"permissionRequestFailed": {
"message": "Permission request failed, did you click deny?"
},
"adblockerIssueWhitelist": {
"message": "If you are unable to resolve this, then disable the setting 'Force Channel Check Before Skipping', as SponsorBlock is unable to retrieve the channel information for this video"
},
"forceChannelCheck": {
"message": "Force Channel Check Before Skipping"
},
"whatForceChannelCheck": {
"message": "By default, it will skip segments right away before it even knows what the channel is. By default, some segments at the start of the video might be skipped on whitelisted channels. Enabling this option will prevent this but making all skipping have a slight delay as getting the channelID can take some time. This delay might be unnoticeable if you have fast internet."
},
"forceChannelCheckPopup": {
"message": "Consider Enabling \"Force Channel Check Before Skipping\""
},
"downvoteDescription": {
"message": "Incorrect/Wrong Timing"
},
"incorrectCategory": {
"message": "Change Category"
},
"nonMusicCategoryOnMusic": {
"message": "This video is categorized as music. Are you sure this has a sponsor? If this is actually a \"Non-Music segment\", open up the extension options and enable this category. Then, you can submit this segment as \"Non-Music\" instead of sponsor. Please read the guidelines if you are confused."
},
"multipleSegments": {
"message": "Multiple Segments"
},
"guidelines": {
"message": "Guidelines"
},
"readTheGuidelines": {
"message": "Read The Guidelines!!",
"description": "Show the first time they submit or if they are \"high risk\""
},
"categoryUpdate1": {
"message": "Categories are here!"
},
"categoryUpdate2": {
"message": "Open the options to skip intros, outros, merch, etc."
},
"help": {
"message": "Help"
},
"GotIt": {
"message": "Got it",
"description": "Used as the button to dismiss a tooltip"
},
"fullVideoTooltipWarning": {
"message": "This segment is large. If the whole video is about one topic, then change from \"Skip\" to \"Full Video\". See the guidelines for more information."
},
"categoryPillTitleText": {
"message": "This entire video is labeled as this category and is too tightly integrated to be able to separate"
},
"experiementOptOut": {
"message": "Opt-out of all future experiments",
"description": "This is used in a popup about a new experiment to get a list of unlisted videos to back up since all unlisted videos uploaded before 2017 will be set to private."
},
"hideForever": {
"message": "Hide forever"
},
"warningChatInfo": {
"message": "You got a warning and cannot submit segments temporarily. This means that we noticed you were making some common mistakes that are not malicious, please just confirm that you understand the rules and we will remove the warning. You can also join this chat using discord.gg/SponsorBlock or matrix.to/#/#sponsor:ajay.app"
},
"voteRejectedWarning": {
"message": "Vote rejected due to a warning. Click to open a chat to resolve it, or come back later when you have time.",
"description": "This is an integrated chat panel that will appearing allowing them to talk to the Discord/Matrix chat without leaving their browser."
},
"Donate": {
"message": "Donate"
},
"considerDonating": {
"message": "Help fund development"
},
"hideDonationLink": {
"message": "Hide Donation Link"
},
"darkModeOptionsPage": {
"message": "Dark Mode On Options Page"
},
"helpPageThanksForInstalling": {
"message": "Thanks for installing SponsorBlock."
},
"helpPageReviewOptions": {
"message": "Please review the options below"
},
"helpPageFeatureDisclaimer": {
"message": "Many features are disabled by default. If you want to skip intros, outros, use Invidious, etc., enable them below. You can also hide/show UI elements."
},
"helpPageHowSkippingWorks": {
"message": "How skipping works"
},
"helpPageHowSkippingWorks1": {
"message": "Video segments will automatically be skipped if they are found in the database. You can open the popup by clicking the extension icon to get a preview of what they are."
},
"helpPageHowSkippingWorks2": {
"message": "Whenever you skip a segment, you will get notice. If the timing seems wrong vote down by clicking downvote! You can also vote in the popup."
},
"Submitting": {
"message": "Submitting"
},
"helpPageSubmitting1": {
"message": "Submitting can either be done in the popup by hitting the \"Segment Starts Now\" button or in the video player with the buttons on the player."
},
"helpPageSubmitting2": {
"message": "Clicking the play button indicated the start of a segment and clicking the stop icon indicates the end. You can prepare multiple sponsors before hitting submit. Clicking the upload button will submit. Clicking the garbage can will delete."
},
"Editing": {
"message": "Editing"
},
"helpPageEditing1": {
"message": "If you messed up, you can edit or delete your segments after clicking the up arrow button."
},
"helpPageTooSlow": {
"message": "This is too slow"
},
"helpPageTooSlow1": {
"message": "There are hotkeys if you want to use them. Press the semicolon key to indicate the start/end of a sponsor segment and click the apostrophe to submit. These can be changed in the options. If you don't use QWERTY, you should probably change the keybinding."
},
"helpPageCopyOfDatabase": {
"message": "Can I get a copy of the Database? What happens if you disappear?"
},
"helpPageCopyOfDatabase1": {
"message": "The database is public and available at"
},
"helpPageCopyOfDatabase2": {
"message": "The source code is freely available. So, even if something happens to me, your submissions are not lost."
},
"helpPageNews": {
"message": "News and how it is made"
},
"helpPageSourceCode": {
"message": "Where can I get the source code?"
},
"Credits": {
"message": "Credits"
},
"LearnMore": {
"message": "Learn More"
},
"CopyDownvoteButtonInfo": {
"message": "Downvotes and creates a local copy for you to resubmit"
},
"OpenCategoryWikiPage": {
"message": "Open this category's wiki page."
},
"CopyAndDownvote": {
"message": "Copy and downvote"
},
"ContinueVoting": {
"message": "Continue Voting"
},
"ChangeCategoryTooltip": {
"message": "This will instantly apply to your segments"
},
"SponsorTimeEditScrollNewFeature": {
"message": "Use your mousewheel while hovering over the edit box to quickly adjust the time. Combinations of the ctrl or shift key can be used to fine tune the changes."
},
"categoryPillNewFeature": {
"message": "New! See when a video is entirely sponsored or self-promotion"
},
"dayAbbreviation": {
"message": "d",
"description": "100d"
},
"hourAbbreviation": {
"message": "h",
"description": "100h"
},
"optionsTabBehavior": {
"message": "Behavior",
"description": "Appears in Options as a tab header for options related to categories and skipping behavior. To fit inside the button, it should not be longer than ~20-25 characters (depending on their width)."
},
"optionsTabInterface": {
"message": "Interface",
"description": "Appears in Options as a tab header for options related to GUI and sounds. To fit inside the button, it should not be longer than ~20-25 characters (depending on their width)."
},
"optionsTabKeyBinds": {
"message": "Keyboard shortcuts",
"description": "Appears in Options as a tab header for keybinds. To fit inside the button, it should not be longer than ~20-25 characters (depending on their width)."
},
"optionsTabBackup": {
"message": "Backup/Restore",
"description": "Appears in Options as a tab header for options related to saving/restoring your settings. To fit inside the button, it should not be longer than ~20-25 characters (depending on their width)."
},
"optionsTabAdvanced": {
"message": "Miscellaneous",
"description": "Appears in Options as a tab header for advanced/niche options. To fit inside the button, it should not be longer than ~20-25 characters (depending on their width)."
},
"noticeVisibilityLabel": {
"message": "Skip notice appearance",
"description": "Option label"
},
"unbind": {
"message": "Unbind",
"description": "Unbind keyboard shortcut"
},
"notSet": {
"message": "Not set"
},
"change": {
"message": "Change"
},
"youtubeKeybindWarning": {
"message": "This is a built-in YouTube shortcut. Are you sure you want to use it?"
}
}

View File

@@ -1,21 +1,7 @@
:root { .hidden {
--skip-notice-right: 10px;
--skip-notice-padding: 5px;
--skip-notice-margin: 5px;
--skip-notice-border-horizontal: 5px;
--skip-notice-border-vertical: 10px;
--sb-dark-red-outline: rgb(130,0,0,0.9);
}
.sbhidden {
display: none; display: none;
} }
/* Vorapi compatibility */
#player-api_VORAPI_ELEMENT_ID #previewbar {
z-index: 999;
}
#previewbar { #previewbar {
overflow: visible; overflow: visible;
padding: 0; padding: 0;
@@ -23,72 +9,21 @@
position: absolute; position: absolute;
width: 100%; width: 100%;
pointer-events: none; pointer-events: none;
height: 100%; height: 100%;
transform: scaleY(0.6) translateY(-30%) translateY(1.5px); transform: scaleY(0.6) translateY(-30%) translateY(1.5px);
z-index: 42; z-index: 40;
transition: transform .1s cubic-bezier(0,0,0.2,1); transition: transform .1s cubic-bezier(0,0,0.2,1);
} }
/* Prevent bar from covering highlights on YTTV */ #previewbar.hovered {
#previewbar.sponsorblock-yttv-container { transform: scaleY(1)
z-index: unset;
}
ytu-time-bar.ytu-storyboard {
text-align: center;
}
/* May 2024 hover preview */
.YtPlayerProgressBarProgressBar #previewbar {
transform: none;
}
.ytp-big-mode #previewbar {
transform: scaleY(0.625) translateY(-30%) translateY(1.5px);
}
.ytp-big-mode .sponsorTwoTooltips .sponsorCategoryTooltip {
top: 75px !important;
}
.progress-bar-line > #previewbar {
height: 3px;
}
div:hover > #previewbar.sbNotInvidious {
transform: scaleY(1);
}
/* Vorapis */
.v3 #previewbar.sbNotInvidious {
transform: scaleY(1);
}
.sponsorCategoryTooltipVisible.ytp-progress-tooltip {
width: 216px !important;
/* left: 264.308px !important; */
} }
.previewbar { .previewbar {
display: inline-block; display: inline-block;
height: 100%; height: 100%;
min-width: 1px;
}
.previewbar-yttv {
height: 10px;
top: 14px;
}
.previewbar.requiredSegment {
transform: scaleY(3);
}
.previewbar.selectedSegment {
opacity: 1 !important;
z-index: 100;
transform: scaleY(1.5);
} }
/* Make sure settings are upfront */ /* Make sure settings are upfront */
@@ -102,68 +37,25 @@ div:hover > #previewbar.sbNotInvidious {
display: none !important; display: none !important;
} }
/* Pull up for precise seeking */
.ytp-tooltip.sponsorCategoryTooltipVisible .ytp-tooltip-edu {
transform: translateY(-1em) !important;
}
.ytp-tooltip.sponsorCategoryTooltipVisible { .ytp-tooltip.sponsorCategoryTooltipVisible {
transform: translateY(-1em) !important; transform: translateY(-1em) !important;
} }
.ytp-tooltip.sponsorCategoryTooltipVisible.sponsorTwoTooltips {
transform: translateY(-2em) !important;
}
.ytp-tooltip.sponsorCategoryTooltipVisible.sponsorHasOriginalTooltip {
transform: translateY(-2em) !important;
}
.ytp-tooltip.sponsorCategoryTooltipVisible.sponsorTwoTooltips.sponsorHasOriginalTooltip {
transform: translateY(-3em) !important;
}
.ytp-big-mode .ytp-tooltip.sponsorCategoryTooltipVisible { .ytp-big-mode .ytp-tooltip.sponsorCategoryTooltipVisible {
transform: translateY(-2em) !important; transform: translateY(-2em) !important;
} }
.ytp-big-mode .ytp-tooltip.sponsorCategoryTooltipVisible.sponsorTwoTooltips {
transform: translateY(-4em) !important;
}
#movie_player:not(.ytp-big-mode) .ytp-tooltip.sponsorCategoryTooltipVisible > .ytp-tooltip-text-wrapper { #movie_player:not(.ytp-big-mode) .ytp-tooltip.sponsorCategoryTooltipVisible > .ytp-tooltip-text-wrapper {
transform: translateY(1em) !important; transform: translateY(1em) !important;
} }
#movie_player:not(.ytp-big-mode) .ytp-tooltip.sponsorCategoryTooltipVisible.sponsorTwoTooltips > .ytp-tooltip-text-wrapper {
transform: translateY(2em) !important;
}
/* Pull up for precise seeking */
.ytp-tooltip.sponsorCategoryTooltipVisible.sponsorTwoTooltips .ytp-tooltip-edu {
transform: translateY(-2em) !important;
}
.ytp-big-mode .ytp-tooltip.sponsorCategoryTooltipVisible > .ytp-tooltip-text-wrapper { .ytp-big-mode .ytp-tooltip.sponsorCategoryTooltipVisible > .ytp-tooltip-text-wrapper {
transform: translateY(0.5em) !important; transform: translateY(0.5em) !important;
} }
.ytp-big-mode .ytp-tooltip.sponsorCategoryTooltipVisible.sponsorTwoTooltips > .ytp-tooltip-text-wrapper { .ytp-big-mode .ytp-tooltip.sponsorCategoryTooltipVisible > .ytp-tooltip-text-wrapper > .ytp-tooltip-text {
transform: translateY(1.75em) !important; display: block !important;
} transform: translateY(1em) !important;
.ytp-big-mode .ytp-tooltip.sponsorCategoryTooltipVisible > .ytp-tooltip-text-wrapper .ytp-tooltip-text {
display: inline-block !important;
transform: translateY(0.75em) !important;
}
.ytp-big-mode .ytp-tooltip.sponsorCategoryTooltipVisible.sponsorTwoTooltips > .ytp-tooltip-text-wrapper .ytp-tooltip-text {
display: inline-block !important;
transform: translateY(0.75em) !important;
}
div:hover > .sponsorBlockChapterBar {
z-index: 41 !important;
} }
/* */ /* */
@@ -188,49 +80,21 @@ div:hover > .sponsorBlockChapterBar {
margin: auto; margin: auto;
} }
.sbChapterVoteButton {
padding: 0 !important;
}
.playerButton { .playerButton {
vertical-align: top; vertical-align: top;
} }
.playerButton.sbhidden:not(.autoHiding) {
display: none !important;
}
/* Removes auto width from being a ytp-player-button */
.sbPlayerDownvote {
width: auto !important;
}
/* Adds back the padding */
.sbPlayerDownvote svg {
padding-right: 3.6px;
}
.sbButtonYTTV {
padding-left: 5px !important;
}
/* YTTV only */
.ytu-player-controls > .skipButtonControlBarContainer > div {
padding-left: 5px;
align-content: center;
}
.autoHiding { .autoHiding {
overflow: visible !important; overflow: visible !important;
} }
.autoHiding:not(.sbhidden) { .autoHiding:not(.hidden) {
transform: translateX(0%) scale(1); transform: translateX(0%) scale(1);
/* opacity is from YouTube page */ /* opacity is from YouTube page */
transition: transform 0.2s, width 0.2s, opacity .1s cubic-bezier(0.4,0.0,1,1) !important; transition: transform 0.2s, width 0.2s, opacity .1s cubic-bezier(0.4,0.0,1,1) !important;
} }
.autoHiding.sbhidden { .autoHiding.hidden {
transform: translateX(100%) scale(0); transform: translateX(100%) scale(0);
/* opacity is from YouTube page */ /* opacity is from YouTube page */
transition: transform 0.2s, width 0.2s, opacity .1s cubic-bezier(0.4,0.0,1,1) !important; transition: transform 0.2s, width 0.2s, opacity .1s cubic-bezier(0.4,0.0,1,1) !important;
@@ -238,19 +102,15 @@ div:hover > .sponsorBlockChapterBar {
width: 0px !important; width: 0px !important;
} }
.autoHiding.sbhidden.autoHideLeft { .autoHiding.hidden.autoHideLeft {
transform: translateX(-100%) scale(0); transform: translateX(-100%) scale(0);
} }
.sponsorSkipObject { .sponsorSkipObject {
font-family: Roboto, Arial, Helvetica, sans-serif; font-family: Roboto, Arial, Helvetica, sans-serif;
margin-left: var(--skip-notice-margin); margin-left: 2px;
margin-right: var(--skip-notice-margin); margin-right: 2px;
}
.sponsorSkipObjectFirst {
margin-left: 0;
} }
.sponsorSkipLogo { .sponsorSkipLogo {
@@ -259,20 +119,10 @@ div:hover > .sponsorBlockChapterBar {
float: left; float: left;
} }
#categoryPill .sbPillNoText .sponsorSkipLogo {
margin-top: calc(2.6rem - 18px);
margin-bottom: calc(2.6rem - 18px);
}
@keyframes fadeIn { @keyframes fadeIn {
from { opacity: 0; } from { opacity: 0; }
} }
@keyframes fadeInToFaded {
from { opacity: 0; }
to { opacity: 0.5; }
}
@keyframes fadeOut { @keyframes fadeOut {
to { opacity: 0; } to { opacity: 0; }
} }
@@ -291,7 +141,7 @@ div:hover > .sponsorBlockChapterBar {
position: absolute; position: absolute;
right: 5px; right: 5px;
bottom: 100px; bottom: 100px;
right: var(--skip-notice-right); right: 10px;
} }
.sponsorSkipNoticeParent { .sponsorSkipNoticeParent {
@@ -302,6 +152,9 @@ div:hover > .sponsorBlockChapterBar {
} }
.sponsorSkipNoticeParent, .sponsorSkipNotice { .sponsorSkipNoticeParent, .sponsorSkipNotice {
min-width: 350px;
max-width: 50%;
border-spacing: 5px 10px; border-spacing: 5px 10px;
padding-left: 5px; padding-left: 5px;
padding-right: 5px; padding-right: 5px;
@@ -309,30 +162,21 @@ div:hover > .sponsorBlockChapterBar {
border-collapse: unset; border-collapse: unset;
} }
.sponsorSkipNotice {
width: 100%;
}
.sponsorSkipNoticeTableContainer { .sponsorSkipNoticeTableContainer {
color: white;
background-color: rgba(28, 28, 28, 0.9); background-color: rgba(28, 28, 28, 0.9);
border-radius: 5px; border-radius: 5px;
min-width: 100%; min-width: 100%;
} }
.exportCopiedNotice .sponsorSkipNoticeTableContainer {
background-color: transparent;
}
.sponsorSkipNotice { .sponsorSkipNotice {
transition: all 0.1s ease-out; transition: all 0.1s ease-out;
} }
.sponsorSkipNoticeLimitWidth { .sponsorSkipNoticeLimitWidth {
max-width: calc(100% - 50px); min-width: calc(100% - 50px);
} }
.sponsorSkipNotice .sbhidden { .sponsorSkipNotice .hidden {
display: none; display: none;
} }
@@ -345,14 +189,6 @@ div:hover > .sponsorBlockChapterBar {
animation: fadeIn 0.5s ease-out; animation: fadeIn 0.5s ease-out;
} }
.sponsorSkipNoticeFadeIn.sponsorSkipNoticeFaded {
animation: fadeInToFaded 0.5s ease-out;
}
.exportCopiedNotice .sponsorSkipNoticeFadeIn {
animation: none;
}
.sponsorSkipNoticeFaded { .sponsorSkipNoticeFaded {
opacity: 0.5; opacity: 0.5;
} }
@@ -384,6 +220,11 @@ div:hover > .sponsorBlockChapterBar {
padding-bottom: 7.8%; padding-bottom: 7.8%;
} }
/* if two are very close to eachother */
.secondSkipNotice {
bottom: 290px;
}
.noticeLeftIcon { .noticeLeftIcon {
display: flex; display: flex;
align-items: center; align-items: center;
@@ -412,7 +253,7 @@ div:hover > .sponsorBlockChapterBar {
.sponsorSkipNoticeButton:hover { .sponsorSkipNoticeButton:hover {
background-color: rgba(235, 235, 235,0.2); background-color: rgba(235, 235, 235,0.2);
border-radius: 4px; border-radius: 4px;
transition: background-color 0.4s; transition: background-color 0.4s;
} }
@@ -447,7 +288,7 @@ div:hover > .sponsorBlockChapterBar {
height: 10px; height: 10px;
width: 10px; width: 10px;
box-sizing: unset; box-sizing: unset;
padding: 2px 5px; padding: 2px 5px;
margin-left: 2px; margin-left: 2px;
@@ -462,7 +303,7 @@ div:hover > .sponsorBlockChapterBar {
font-size: 14px; font-size: 14px;
font-weight: bold; font-weight: bold;
color: rgb(235, 235, 235); color: rgb(235, 235, 235);
margin-top: auto; margin-top: auto;
display: inline-block; display: inline-block;
margin-right: 10px; margin-right: 10px;
@@ -500,23 +341,15 @@ div:hover > .sponsorBlockChapterBar {
.sponsorTimesInfoMessage { .sponsorTimesInfoMessage {
font-size: 13.3333px; font-size: 13.3333px;
color: rgb(235, 235, 235); color: rgb(235, 235, 235);
overflow-wrap: anywhere;
} }
.sb-guidelines-notice .sponsorTimesInfoMessage td { .voteButton {
padding-left: 5px; height: 24px;
padding-top: 2px; width: 24px;
padding-bottom: 2px; cursor: pointer;
font-size: 15px;
display: flex;
align-items: center;
} }
.voteButton:hover {
.sponsorTimesInfoIcon { filter: brightness(80%);
width: 30px;
padding-right: 10px;
padding-left: 10px;
} }
.segmentSummary { .segmentSummary {
@@ -536,7 +369,7 @@ div:hover > .sponsorBlockChapterBar {
padding:4px 15px; padding:4px 15px;
text-decoration:none; text-decoration:none;
text-shadow:0px 0px 0px #662727; text-shadow:0px 0px 0px #662727;
margin-top: 5px; margin-top: 5px;
margin-right: 15px; margin-right: 15px;
} }
@@ -572,7 +405,7 @@ div:hover > .sponsorBlockChapterBar {
padding:4px 15px; padding:4px 15px;
text-decoration:none; text-decoration:none;
text-shadow:0px 0px 0px #662727; text-shadow:0px 0px 0px #662727;
margin-top: 5px; margin-top: 5px;
margin-right: 15px; margin-right: 15px;
} }
@@ -630,11 +463,11 @@ div:hover > .sponsorBlockChapterBar {
.sponsorTimeEditButton { .sponsorTimeEditButton {
text-decoration: underline; text-decoration: underline;
margin-left: 13px; margin-left: 20px;
margin-right: 13px; margin-right: 20px;
font-size: 13px; font-size: 13px;
cursor: pointer; cursor: pointer;
} }
@@ -655,17 +488,10 @@ input::-webkit-inner-spin-button {
font-size: 14px; font-size: 14px;
-moz-appearance: textfield; -moz-appearance: textfield;
appearance: textfield;
} }
.sponsorTimeEditInput { .sponsorTimeEditInput {
width: 90px; width: 90px;
border: 3px solid var(--sb-dark-red-outline);
}
.sponsorTimeEditInput.sponsorChapterNameInput {
width: auto;
padding: 3px;
} }
.sponsorNowButton { .sponsorNowButton {
@@ -680,92 +506,44 @@ input::-webkit-inner-spin-button {
margin-bottom: 5px; margin-bottom: 5px;
background-color: rgba(28, 28, 28, 0.9); background-color: rgba(28, 28, 28, 0.9);
border-color: var(--sb-dark-red-outline); border-color: rgb(130,0,0,0.9);
color: white; color: white;
border-width: 3px; border-width: 3px;
padding: 3px; padding: 3px;
} }
.sponsorTimeEditSelector > option {
background-color: rgba(28, 28, 28, 0.9);
color: white;
}
.hideSegmentSubmitButton {
cursor: pointer;
margin: auto;
top: 0;
bottom: 0;
position: absolute;
}
/* Start SelectorComponent */
.sbSelector {
position: absolute;
text-align: center;
width: calc(100% - var(--skip-notice-right) - var(--skip-notice-padding) * 2 - var(--skip-notice-margin) * 2 - var(--skip-notice-border-horizontal) * 2);
z-index: 1000;
}
.sbSelectorBackground {
text-align: center;
background-color: rgba(28, 28, 28, 0.9);
border-radius: 6px;
padding: 3px;
margin: auto;
width: 170px;
}
.sbSelectorOption {
cursor: pointer;
background-color: rgb(43, 43, 43);
padding: 5px;
margin: 5px;
color: white;
border-radius: 5px;
font-size: 14px;
margin-left: auto;
margin-right: auto;
}
.sbSelectorOption:hover {
background-color: #3a0000;
}
/* End SelectorComponent */
.helpButton { .helpButton {
height: 25px; height: 25px;
cursor: pointer; cursor: pointer;
padding: 5px; padding: 5px;
margin: auto; margin: auto;
top: 0; top: 0;
bottom: 0; bottom: 0;
position: absolute; position: absolute;
} }
.helpButton:hover { .helpButton:hover {
opacity: 0.8; filter: brightness(80%);
}
.sbChatNotice iframe {
height: 32px;
cursor: pointer;
height: 100%;
}
.sbChatClose {
height: 14px;
cursor: pointer;
} }
.skipButtonControlBarContainer { .skipButtonControlBarContainer {
cursor: pointer; cursor: pointer;
display: flex; display: flex;
color: white; color: white;
align-items: center;
} }
/* July 2025 test UI */ .skipButtonControlBarContainer.hidden {
.ytp-delhi-modern .skipButtonControlBarContainer {
height: 48px;
margin: auto 0;
}
.skipButtonControlBarContainer.sbhidden {
display: none !important; display: none !important;
} }
@@ -810,13 +588,11 @@ input::-webkit-inner-spin-button {
border-radius: 5px; border-radius: 5px;
padding: 10px; padding: 10px;
max-width: 300px; max-width: 300px;
width: max-content;
white-space: normal; white-space: normal;
line-height: 1.5em; line-height: 1.5em;
color: white; color: white;
font-size: 12px; font-size: 12px;
z-index: 10000; z-index: 1000;
font-weight: normal;
} }
.sponsorBlockTooltip a { .sponsorBlockTooltip a {
@@ -834,19 +610,8 @@ input::-webkit-inner-spin-button {
border-color: rgba(28, 28, 28, 0.7) transparent transparent transparent; border-color: rgba(28, 28, 28, 0.7) transparent transparent transparent;
} }
.sponsorBlockTooltip.sbTriangle.centeredSBTriangle::after {
left: 50%;
right: 50%;
}
.sponsorBlockTooltip.sbTriangle.sbTopTriangle::after {
bottom: 100%;
top: unset;
border-color: transparent transparent rgba(28, 28, 28, 0.7) transparent;
}
.sponsorBlockLockedColor { .sponsorBlockLockedColor {
color: #ffc83d !important; color: #ffc83d;
} }
.sponsorBlockRectangleTooltip { .sponsorBlockRectangleTooltip {
@@ -859,26 +624,6 @@ input::-webkit-inner-spin-button {
line-height: 1.5em; line-height: 1.5em;
} }
/* Description on right layout */
#title > #categoryPillParent {
font-size: 2rem;
font-weight: bold;
display: flex;
justify-content: center;
line-height: 2.8rem;
}
#title > #categoryPillParent > #categoryPill.cbPillOpen {
margin-bottom: 5px;
}
#categoryPillParent {
height: fit-content;
margin-top: auto;
margin-bottom: auto;
position: relative;
}
.sponsorBlockCategoryPill { .sponsorBlockCategoryPill {
border-radius: 25px; border-radius: 25px;
padding-left: 8px; padding-left: 8px;
@@ -896,103 +641,15 @@ input::-webkit-inner-spin-button {
align-items: center; align-items: center;
} }
.sponsorBlockCategoryPillTitle {
white-space: nowrap;
}
/* Vorapis V3 support */
#watch7-content .sponsorBlockCategoryPill {
padding-top: 5px;
padding-bottom: 5px;
}
#watch7-content .sponsorBlockCategoryPillTitle {
font-size: 15px;
}
.categoryPillClose { .categoryPillClose {
display: none; display: none;
height: 10px; height: 10px;
width: 10px; width: 10px;
box-sizing: unset; box-sizing: unset;
margin: 0px 0px 0px 5px; margin: 0px 0px 0px 5px;
} }
.sponsorBlockCategoryPill:hover .categoryPillClose { .sponsorBlockCategoryPill:hover .categoryPillClose {
display: inherit; display: inherit;
}
/* tweak for mobile duration */
#sponsorBlockDurationAfterSkips.ytm-time-display {
padding-left: 4px;
margin: 0px;
color: #fff;
opacity: .7;
}
/* full video labels on thumbnails */
.sponsorThumbnailLabel {
display: none;
position: absolute;
top: 0;
left: 0;
padding: 0.5em;
margin: 0.5em;
border-radius: 2em;
z-index: 1000;
background-color: var(--category-color, #000);
opacity: 0.7;
box-shadow: 0 0 8px 2px #333;
font-size: 10px;
}
.sponsorThumbnailLabel.sponsorThumbnailLabelVisible {
display: flex;
}
.sponsorThumbnailLabel svg {
height: 2em;
fill: var(--category-text-color, #fff);
}
.sponsorThumbnailLabel span {
display: none;
padding-left: 0.25em;
font-size: 1.5em;
color: var(--category-text-color, #fff);
}
.sponsorThumbnailLabel:hover {
border-radius: 0.25em;
opacity: 1;
}
.sponsorThumbnailLabel:hover span {
display: inline;
}
.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);
} }

Binary file not shown.

Before

Width:  |  Height:  |  Size: 124 KiB

After

Width:  |  Height:  |  Size: 54 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 9.7 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 64 KiB

View File

@@ -4,10 +4,11 @@
<title> SponsorBlock </title> <title> SponsorBlock </title>
<meta charset="utf-8"> <meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1" /> <meta name="viewport" content="width=device-width, initial-scale=1" />
<link rel="icon" href="../icons/IconSponsorBlocker32px.png" type="image/png"> <link rel="icon" href="../icons/LogoSponsorBlocker64px.png" type="image/png">
<link href="styles.css" rel="stylesheet"/> <link href="styles.css" rel="stylesheet"/>
<script src="../js/vendor.js"></script>
<script src="../js/help.js"></script> <script src="../js/help.js"></script>
</head> </head>
@@ -15,134 +16,41 @@
<div id="title"> <div id="title">
<img src="../icons/LogoSponsorBlocker256px.png" height="80" class="profilepic"/> <img src="../icons/LogoSponsorBlocker256px.png" height="80" class="profilepic"/>
SponsorBlock SponsorLock
</div> </div>
<div class="container sponsorBlockPageBody"> <div class="container sponsorBlockPageBody">
<p class="createdBy"> <p>
<img src="../icons/newprofilepic.jpg" height="30" class="profilepiccircle"/> By using this extension, you agree to the <a href="https://gist.github.com/ajayyy/aa9f8ded2b573d4f73a3ffa0ef74f796">Privacy Policy</a> and <a href="https://gist.github.com/ajayyy/9e8100f069348e0bc062641f34d6af12">Terms of Use</a>.
Created By <a href="https://ajay.app">Ajay Ramachandran</a>
</p> </p>
<span class="help-page-flex-container"> <p>
<div class="left-sidebar"> <b>Please uninstall regular SponsorBlock before trying this out.</b> Good luck! This extension was created for April 1st 2022.
<div class="box1"> </p>
<p>
__MSG_helpPageThanksForInstalling__ By using this extension, you agree to the <a href="https://gist.github.com/ajayyy/aa9f8ded2b573d4f73a3ffa0ef74f796">Privacy Policy</a> and <a href="https://gist.github.com/ajayyy/9e8100f069348e0bc062641f34d6af12">Terms of Use</a>.
</p>
<p>
Come contribute, make some suggestions and help out on <a href="https://discord.gg/SponsorBlock">Discord</a> or on <a href="https://matrix.to/#/#sponsor:ajay.app?via=ajay.app&via=matrix.org&via=mozilla.org">Matrix</a>.
</p>
<a href="https://dearrow.ajay.app"
target="_blank"
id="dearrow-link"
class="dearrow-link hidden"
rel="noreferrer">
<img src="/icons/dearrow.svg"/>
<span id="dearrow-link-text">
</span>
<img src="/icons/close.png" class="close-button"/>
</a>
<div id="donate-component" class="donate-ask">
<div class="donate-text">
<img
src="../icons/newprofilepic.jpg"
alt="Ajay's avatar"
></img>
__MSG_supportSponsorBlock__
</div>
<a href="https://sponsor.ajay.app/donate" class="donate-button" target="_blank" rel="noopener">
__MSG_Donate__
</a>
</div>
</div>
<div class="box3">
<h1>__MSG_helpPageHowSkippingWorks__</h1>
<p class="projectPreview">
__MSG_helpPageHowSkippingWorks2__
</p>
<div class="center"><img src="images/voting on notice.gif"></div> <p style="margin-bottom: 0; margin-top: 0" class="bigText center">__MSG_helpPageReviewOptions__</p>
<p class="projectPreview">
__MSG_helpPageHowSkippingWorks1__
</p>
<div class="center"><img style="height: 400px;" src="images/popup.png"></div>
<h1>__MSG_Submitting__</h1> <iframe class="optionsFrame" src="../options/lock-options.html#embed" style="border: none"></iframe>
<p class="projectPreview">
__MSG_helpPageSubmitting1__
</p>
<div class="center"><img src="images/votebuttons.gif"></div> <h1>__MSG_helpPageSourceCode__</h1>
<p class="projectPreview"> <h4 style="display: inline">Client:</h4>
__MSG_helpPageSubmitting2__ <!-- Github logo -->
</p> <a href="https://github.com/ajayyy/SponsorBlock/tree/april-fools-2022"><svg aria-hidden="true" version="1.1" viewBox="0 0 16 16" height="58px" style="padding-left: 15px"><path fill-rule="evenodd" d="M8 0C3.58 0 0 3.58 0 8c0 3.54 2.29 6.53 5.47 7.59.4.07.55-.17.55-.38 0-.19-.01-.82-.01-1.49-2.01.37-2.53-.49-2.69-.94-.09-.23-.48-.94-.82-1.13-.28-.15-.68-.52-.01-.53.63-.01 1.08.58 1.23.82.72 1.21 1.87.87 2.33.66.07-.52.28-.87.51-1.07-1.78-.2-3.64-.89-3.64-3.95 0-.87.31-1.59.82-2.15-.08-.2-.36-1.02.08-2.12 0 0 .67-.21 2.2.82.64-.18 1.32-.27 2-.27.68 0 1.36.09 2 .27 1.53-1.04 2.2-.82 2.2-.82.44 1.1.16 1.92.08 2.12.51.56.82 1.27.82 2.15 0 3.07-1.87 3.75-3.65 3.95.29.25.54.73.54 1.48 0 1.07-.01 1.93-.01 2.2 0 .21.15.46.55.38A8.013 8.013 0 0 0 16 8c0-4.42-3.58-8-8-8z"></path></svg></a>
<div class="center"><img src="images/submission menu.png"></div> <h4 style="display: inline; padding-left: 20px">Server:</h4>
<!-- Github logo -->
<a href="https://github.com/ajayyy/SponsorBlockServer"><svg aria-hidden="true" version="1.1" viewBox="0 0 16 16" height="58px" style="padding-left: 15px"><path fill-rule="evenodd" d="M8 0C3.58 0 0 3.58 0 8c0 3.54 2.29 6.53 5.47 7.59.4.07.55-.17.55-.38 0-.19-.01-.82-.01-1.49-2.01.37-2.53-.49-2.69-.94-.09-.23-.48-.94-.82-1.13-.28-.15-.68-.52-.01-.53.63-.01 1.08.58 1.23.82.72 1.21 1.87.87 2.33.66.07-.52.28-.87.51-1.07-1.78-.2-3.64-.89-3.64-3.95 0-.87.31-1.59.82-2.15-.08-.2-.36-1.02.08-2.12 0 0 .67-.21 2.2.82.64-.18 1.32-.27 2-.27.68 0 1.36.09 2 .27 1.53-1.04 2.2-.82 2.2-.82.44 1.1.16 1.92.08 2.12.51.56.82 1.27.82 2.15 0 3.07-1.87 3.75-3.65 3.95.29.25.54.73.54 1.48 0 1.07-.01 1.93-.01 2.2 0 .21.15.46.55.38A8.013 8.013 0 0 0 16 8c0-4.42-3.58-8-8-8z"></path></svg></a>
<p class="projectPreview center"> <h1>__MSG_Credits__</h1>
<a href="https://wiki.sponsor.ajay.app/w/Guidelines" target="_blank">__MSG_guidelines__</a>
<br/>
<a href="https://wiki.sponsor.ajay.app/w/Advice_for_submitting" target="_blank">__MSG_AdviceForSubmitting__</a>
</p>
<h1>__MSG_helpPageCopyOfDatabase__</h1> <p>Some icons made by <a href="https://www.flaticon.com/authors/gregor-cresnar" title="Gregor Cresnar">Gregor Cresnar</a> from <a href="https://www.flaticon.com/" title="Flaticon">www.flaticon.com</a> and are licensed by <a href="https://creativecommons.org/licenses/by/3.0/" title="Creative Commons BY 3.0" target="_blank">CC 3.0 BY</a></p>
<p> <p>Some icons made by <a href="https://www.flaticon.com/authors/freepik" title="Freepik">Freepik</a> from <a href="https://www.flaticon.com/" title="Flaticon">www.flaticon.com</a> and are licensed by <a href="https://creativecommons.org/licenses/by/3.0/" title="Creative Commons BY 3.0" target="_blank">CC 3.0 BY</a></p>
__MSG_helpPageCopyOfDatabase1__ <a href="https://sponsor.ajay.app/database">https://sponsor.ajay.app/database</a>. __MSG_helpPageCopyOfDatabase2__
</p> <p style="text-align: center;"><a href="/oss-attribution/attribution.txt">Open Source Licenses</a></p>
<h4 style="display: inline">Client:</h4> </div>
<!-- Github logo -->
<a href="https://github.com/ajayyy/SponsorBlock"><svg aria-hidden="true" version="1.1" viewBox="0 0 16 16" height="58px" style="padding-left: 15px"><path fill-rule="evenodd" d="M8 0C3.58 0 0 3.58 0 8c0 3.54 2.29 6.53 5.47 7.59.4.07.55-.17.55-.38 0-.19-.01-.82-.01-1.49-2.01.37-2.53-.49-2.69-.94-.09-.23-.48-.94-.82-1.13-.28-.15-.68-.52-.01-.53.63-.01 1.08.58 1.23.82.72 1.21 1.87.87 2.33.66.07-.52.28-.87.51-1.07-1.78-.2-3.64-.89-3.64-3.95 0-.87.31-1.59.82-2.15-.08-.2-.36-1.02.08-2.12 0 0 .67-.21 2.2.82.64-.18 1.32-.27 2-.27.68 0 1.36.09 2 .27 1.53-1.04 2.2-.82 2.2-.82.44 1.1.16 1.92.08 2.12.51.56.82 1.27.82 2.15 0 3.07-1.87 3.75-3.65 3.95.29.25.54.73.54 1.48 0 1.07-.01 1.93-.01 2.2 0 .21.15.46.55.38A8.013 8.013 0 0 0 16 8c0-4.42-3.58-8-8-8z"></path></svg></a>
<h4 style="display: inline; padding-left: 20px">Server:</h4>
<!-- Github logo -->
<a href="https://github.com/ajayyy/SponsorBlockServer"><svg aria-hidden="true" version="1.1" viewBox="0 0 16 16" height="58px" style="padding-left: 15px"><path fill-rule="evenodd" d="M8 0C3.58 0 0 3.58 0 8c0 3.54 2.29 6.53 5.47 7.59.4.07.55-.17.55-.38 0-.19-.01-.82-.01-1.49-2.01.37-2.53-.49-2.69-.94-.09-.23-.48-.94-.82-1.13-.28-.15-.68-.52-.01-.53.63-.01 1.08.58 1.23.82.72 1.21 1.87.87 2.33.66.07-.52.28-.87.51-1.07-1.78-.2-3.64-.89-3.64-3.95 0-.87.31-1.59.82-2.15-.08-.2-.36-1.02.08-2.12 0 0 .67-.21 2.2.82.64-.18 1.32-.27 2-.27.68 0 1.36.09 2 .27 1.53-1.04 2.2-.82 2.2-.82.44 1.1.16 1.92.08 2.12.51.56.82 1.27.82 2.15 0 3.07-1.87 3.75-3.65 3.95.29.25.54.73.54 1.48 0 1.07-.01 1.93-.01 2.2 0 .21.15.46.55.38A8.013 8.013 0 0 0 16 8c0-4.42-3.58-8-8-8z"></path></svg></a>
<h1>__MSG_Credits__</h1>
<p>
Thanks to all <a href="https://github.com/ajayyy/SponsorBlock/graphs/contributors">SponsorBlock contributors</a>,
<a href="https://github.com/ajayyy/SponsorBlockServer/graphs/contributors">SponsorBlockServer contributors</a> and
<a href="https://github.com/ajayyy/SponsorBlockSite/graphs/contributors">SponsorBlockSite contributors</a> such
as <a href="https://github.com/NDevTK">NDev</a>, <a href="https://github.com/Joe-Dowd">Joe Dowd</a>,
<a href="https://mchang.name/">Michael Chang</a> and more.
</p>
<p>
Logo by <a href="https://github.com/munadikieh">Munadi Kiehl</a>
</p>
<p>Some icons made by <a href="https://www.flaticon.com/authors/gregor-cresnar" title="Gregor Cresnar">Gregor Cresnar</a> from <a href="https://www.flaticon.com/" title="Flaticon">www.flaticon.com</a> and are licensed by <a href="https://creativecommons.org/licenses/by/3.0/" title="Creative Commons BY 3.0" target="_blank">CC 3.0 BY</a></p>
<p>Some icons made by <a href="https://www.flaticon.com/authors/freepik" title="Freepik">Freepik</a> from <a href="https://www.flaticon.com/" title="Flaticon">www.flaticon.com</a> and are licensed by <a href="https://creativecommons.org/licenses/by/3.0/" title="Creative Commons BY 3.0" target="_blank">CC 3.0 BY</a></p>
<p style="text-align: center;"><a href="/oss-attribution/attribution.txt">Open Source Licenses</a></p>
</div>
</div>
<div class="box2">
<p style="margin-bottom: 0; margin-top: 0" class="bigText center">__MSG_helpPageReviewOptions__</p>
<p class="smallText" style="margin-bottom: 0; margin-top: 0">
__MSG_helpPageFeatureDisclaimer__
</p>
<iframe class="optionsFrame" src="../options/options.html#embed" style="border: none"></iframe>
</div>
</span>
</body> </body>

View File

@@ -29,11 +29,7 @@ html {
} }
.bigText { .bigText {
font-size: 30px; font-size: 50px;
}
.smallText {
font-size: 14px;
} }
body { body {
@@ -50,6 +46,7 @@ body {
} }
.container { .container {
max-width: 60%;
margin: auto; margin: auto;
} }
@@ -171,7 +168,7 @@ p,li,code,a {
.optionsFrame { .optionsFrame {
width: 100%; width: 100%;
height: 100%; height: 500px;
} }
.previewImage { .previewImage {
@@ -197,59 +194,14 @@ img {
h1,h2,h3,h4,h5,h6 { h1,h2,h3,h4,h5,h6 {
color: var(--title); color: var(--title);
text-align: center; text-align: center;
font-size: 25px;
margin: 5px 0px;
} }
svg { svg {
text-decoration: none; text-decoration: none;
} }
.donate-ask { #sbDonate {
background-color: rgb(26, 26, 26, 0.95); font-size: 10px;
border-radius: 15px;
text-align: center;
padding: 10px;
margin: 0.7em 0px;
}
.donate-ask .donate-text {
margin-top: 10px;
margin-bottom: 10px;
display: flex;
align-items: center;
justify-content: center;
}
.donate-ask .donate-text img {
height: 2rem;
border-radius: 100%;
margin-right: 15px;
}
.donate-ask a {
text-decoration: none;
color: #eee;
border-radius: 15px;
background-color: rgb(58, 58, 58, 0.9);
padding: 10px;
transition: background-color 0.3s ease;
display: block;
width: fit-content;
margin: auto;
margin-top: 10px;
margin-bottom: 10px;
}
.donate-ask a:hover {
background-color: rgba(70, 70, 70, 0.9);
} }
@media screen and (orientation:portrait) { @media screen and (orientation:portrait) {
@@ -370,79 +322,4 @@ svg {
cursor: default; cursor: default;
background-color: var(--disabled); background-color: var(--disabled);
color: grey; color: grey;
}
.dearrow-link {
display: flex;
align-items: center;
justify-content: center;
text-decoration: none;
font-size: 16px;
}
.dearrow-link img {
width: 35px;
padding: 10px
}
.dearrow-link .close-button {
opacity: 0;
width: 15px;
filter: invert(0.3);
transition: opacity 0.2s;
}
.dearrow-link:hover .close-button {
opacity: 1;
}
.hidden {
display: none;
}
.help-page-flex-container {
display: flex;
flex-direction: row;
gap: 20px;
margin-left: 20px;
margin-right: 20px;
}
.left-sidebar {
display: flex;
flex-direction: column;
flex: 1 1 50%;
}
.box2 {
flex: 1 1 50%;
}
/* Mobile */
@media only screen and (max-width: 600px) {
.box1 {
order: 1;
}
.box2 {
order: 2;
}
.box3 {
order: 3;
}
.left-sidebar {
display: contents;
}
.help-page-flex-container {
flex-direction: column;
}
.optionsFrame {
height: 500px;
}
} }

Binary file not shown.

Before

Width:  |  Height:  |  Size: 65 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 22 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 24 KiB

After

Width:  |  Height:  |  Size: 6.8 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 39 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 13 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 79 KiB

After

Width:  |  Height:  |  Size: 52 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 7.3 KiB

After

Width:  |  Height:  |  Size: 11 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 17 KiB

After

Width:  |  Height:  |  Size: 9.0 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 36 KiB

After

Width:  |  Height:  |  Size: 21 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 3.4 KiB

After

Width:  |  Height:  |  Size: 1.7 KiB

View File

@@ -1,17 +1,20 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?> <?xml version="1.0" encoding="UTF-8" standalone="no"?>
<svg <svg
xmlns:dc="http://purl.org/dc/elements/1.1/"
xmlns:cc="http://creativecommons.org/ns#"
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
xmlns:svg="http://www.w3.org/2000/svg"
xmlns="http://www.w3.org/2000/svg"
xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
viewBox="0 0 565.15 568" viewBox="0 0 565.15 568"
version="1.1" version="1.1"
id="svg16" id="svg16"
sodipodi:docname="PlayerStartIconSponsorBlocker.svg" sodipodi:docname="PlayerStartIconSponsorBlocker.svg"
inkscape:version="0.92.4 (5da689c313, 2019-01-14)"> inkscape:version="1.1.2 (0a00cf5339, 2022-02-04, custom)"
inkscape:export-filename="/home/ajay/projects/sb-extension/public/icons/LogoSponsorBlocker1024px.png"
inkscape:export-xdpi="173.9155"
inkscape:export-ydpi="173.9155"
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"
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
xmlns:cc="http://creativecommons.org/ns#"
xmlns:dc="http://purl.org/dc/elements/1.1/">
<metadata <metadata
id="metadata20"> id="metadata20">
<rdf:RDF> <rdf:RDF>
@@ -33,16 +36,17 @@
inkscape:pageopacity="0" inkscape:pageopacity="0"
inkscape:pageshadow="2" inkscape:pageshadow="2"
inkscape:window-width="1920" inkscape:window-width="1920"
inkscape:window-height="1001" inkscape:window-height="983"
id="namedview18" id="namedview18"
showgrid="false" showgrid="false"
inkscape:zoom="0.83098592" inkscape:zoom="0.83098592"
inkscape:cx="-0.3618106" inkscape:cx="444.69697"
inkscape:cy="322.44266" inkscape:cy="271.26356"
inkscape:window-x="477" inkscape:window-x="380"
inkscape:window-y="961" inkscape:window-y="768"
inkscape:window-maximized="1" inkscape:window-maximized="1"
inkscape:current-layer="Layer_1-2" /> inkscape:current-layer="Layer_1-2"
inkscape:pagecheckerboard="0" />
<defs <defs
id="defs4"> id="defs4">
<style <style
@@ -58,14 +62,15 @@
data-name="Layer 1" data-name="Layer 1"
style="fill:#ffffff"> style="fill:#ffffff">
<path <path
class="cls-1" id="path953"
d="M282.58,568a65,65,0,0,1-34.14-9.66C95.41,463.94,2.54,300.46,0,121A64.91,64.91,0,0,1,34,62.91a522.56,522.56,0,0,1,497.16,0,64.91,64.91,0,0,1,34,58.12c-2.53,179.43-95.4,342.91-248.42,437.3A65,65,0,0,1,282.58,568Zm0-548.31A502.24,502.24,0,0,0,43.4,80.22a45.27,45.27,0,0,0-23.7,40.53c2.44,172.67,91.81,330,239.07,420.83a46.19,46.19,0,0,0,47.61,0C453.64,450.73,543,293.42,545.45,120.75a45.26,45.26,0,0,0-23.7-40.54A502.26,502.26,0,0,0,282.58,19.69Z" style="fill:none;stroke:#07a500;stroke-width:40"
id="path8" d="M 279.39062,24.197266 C 179.21701,24.603169 98.318528,101.48391 98.605469,196.00391 c 0.159023,40.69515 15.666041,80.00792 43.744141,110.89843 V 147.87891 l 16.75935,97.00627 C 164.72335,211.06602 65.553309,180.55346 92.112522,170.56303 L 193.6089,410.46016 435.49163,328.41259 443.41016,147.87891 v 46.7539 l 18.32422,-0.0996 C 461.16135,100.01356 379.56507,23.790617 279.39062,24.197266 Z M 443.41016,195.51367 v 74.92188 c 12.04625,-23.34115 18.3128,-48.96032 18.32617,-74.92188 z"
style="fill:#ffffff" /> sodipodi:nodetypes="cccccccccccccccc" />
<path <path
style="fill:#ffffff" style="fill:#008000"
d="M 284.70508 42.693359 A 479.9 479.9 0 0 0 54.369141 100.41992 A 22.53 22.53 0 0 0 42.669922 120.41992 C 45.069922 290.25992 135.67008 438.63977 270.83008 522.00977 A 22.48 22.48 0 0 0 294.32031 522.00977 C 429.48031 438.63977 520.08047 290.25992 522.48047 120.41992 A 22.53 22.53 0 0 0 510.7793 100.41992 A 479.9 479.9 0 0 0 284.70508 42.693359 z M 220.41016 145.74023 L 411.2793 255.93945 L 220.41016 366.14062 L 220.41016 145.74023 z " d="m 281.94584,119.65312 -239.275918,0.7668 c 0,0 -0.08983,-8.3148 0,0 2.4,169.84 93.000158,318.21985 228.160158,401.58985 7.20735,4.41633 16.28288,4.41633 23.49023,0 135.16,-83.37 225.76016,-231.74985 228.16016,-401.58985 v 0 z M 220.41016,145.74023 411.2793,255.93945 220.41016,366.14062 Z"
id="path10" /> id="path10"
sodipodi:nodetypes="cccccccccccc" />
</g> </g>
</g> </g>
</svg> </svg>

Before

Width:  |  Height:  |  Size: 2.7 KiB

After

Width:  |  Height:  |  Size: 2.9 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 6.7 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 3.1 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 3.5 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 4.6 KiB

View File

@@ -1,37 +0,0 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<svg
height="48"
width="48"
version="1.1"
id="svg4"
sodipodi:docname="bolt.svg"
inkscape:version="1.1.2 (0a00cf5339, 2022-02-04, custom)"
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="defs8" />
<sodipodi:namedview
id="namedview6"
pagecolor="#ffffff"
bordercolor="#666666"
borderopacity="1.0"
inkscape:pageshadow="2"
inkscape:pageopacity="0.0"
inkscape:pagecheckerboard="0"
showgrid="false"
inkscape:zoom="13.125"
inkscape:cx="24"
inkscape:cy="24"
inkscape:window-width="1920"
inkscape:window-height="983"
inkscape:window-x="482"
inkscape:window-y="768"
inkscape:window-maximized="1"
inkscape:current-layer="svg4" />
<path
d="M19.95 42 22 27.9H14.7Q14.15 27.9 13.9 27.4Q13.65 26.9 13.9 26.45L26.15 6H28.2L26.15 20.05H33.35Q33.9 20.05 34.175 20.55Q34.45 21.05 34.2 21.5L22 42Z"
id="path2"
style="fill:#ffffff" />
</svg>

Before

Width:  |  Height:  |  Size: 1.2 KiB

View File

@@ -1,37 +0,0 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<svg
height="48"
width="48"
version="1.1"
id="svg4"
sodipodi:docname="campaign.svg"
inkscape:version="1.1.2 (0a00cf5339, 2022-02-04, custom)"
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="defs8" />
<sodipodi:namedview
id="namedview6"
pagecolor="#ffffff"
bordercolor="#666666"
borderopacity="1.0"
inkscape:pageshadow="2"
inkscape:pageopacity="0.0"
inkscape:pagecheckerboard="0"
showgrid="false"
inkscape:zoom="13.125"
inkscape:cx="24"
inkscape:cy="24"
inkscape:window-width="1920"
inkscape:window-height="983"
inkscape:window-x="482"
inkscape:window-y="768"
inkscape:window-maximized="1"
inkscape:current-layer="svg4" />
<path
d="M36.5 25.5V22.5H44V25.5ZM39 40 32.95 35.5 34.75 33.1 40.8 37.6ZM34.9 14.85 33.1 12.45 39 8 40.8 10.4ZM10.5 38V30H7Q5.75 30 4.875 29.125Q4 28.25 4 27V21Q4 19.75 4.875 18.875Q5.75 18 7 18H16L26 12V36L16 30H13.5V38ZM28 30.7V17.3Q29.35 18.5 30.175 20.225Q31 21.95 31 24Q31 26.05 30.175 27.775Q29.35 29.5 28 30.7Z"
id="path2"
style="fill:#ffffff" />
</svg>

Before

Width:  |  Height:  |  Size: 1.3 KiB

View File

@@ -1,38 +0,0 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<svg
width="24"
height="24"
version="1.1"
id="svg4"
sodipodi:docname="check-smaller.svg"
inkscape:version="1.1.2 (0a00cf5339, 2022-02-04, custom)"
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="defs8" />
<sodipodi:namedview
id="namedview6"
pagecolor="#ffffff"
bordercolor="#666666"
borderopacity="1.0"
inkscape:pageshadow="2"
inkscape:pageopacity="0.0"
inkscape:pagecheckerboard="0"
showgrid="false"
inkscape:zoom="26.25"
inkscape:cx="12.038095"
inkscape:cy="12"
inkscape:window-width="1920"
inkscape:window-height="983"
inkscape:window-x="482"
inkscape:window-y="768"
inkscape:window-maximized="1"
inkscape:current-layer="svg4" />
<path
fill="#ffffff"
d="M 17.69347,4.9833775 9.9421192,12.940517 6.3065298,9.5107153 3.7684768,12.048769 9.9421192,18.016623 20.231523,7.5214304 Z"
id="path2"
style="stroke-width:0.68596" />
</svg>

Before

Width:  |  Height:  |  Size: 1.2 KiB

View File

@@ -1,37 +0,0 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<svg
height="48"
width="48"
version="1.1"
id="svg4"
sodipodi:docname="close-smaller.svg"
inkscape:version="1.1.2 (0a00cf5339, 2022-02-04, custom)"
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="defs8" />
<sodipodi:namedview
id="namedview6"
pagecolor="#ffffff"
bordercolor="#666666"
borderopacity="1.0"
inkscape:pageshadow="2"
inkscape:pageopacity="0.0"
inkscape:pagecheckerboard="0"
showgrid="false"
inkscape:zoom="13.125"
inkscape:cx="24"
inkscape:cy="24"
inkscape:window-width="1366"
inkscape:window-height="731"
inkscape:window-x="0"
inkscape:window-y="0"
inkscape:window-maximized="1"
inkscape:current-layer="svg4" />
<path
d="M12.45 37.65 10.35 35.55 21.9 24 10.35 12.45 12.45 10.35 24 21.9 35.55 10.35 37.65 12.45 26.1 24 37.65 35.55 35.55 37.65 24 26.1Z"
id="path2"
style="fill:#ffffff" />
</svg>

Before

Width:  |  Height:  |  Size: 1.1 KiB

View File

@@ -1,54 +0,0 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<svg
width="800px"
height="800px"
viewBox="0 0 36 36"
aria-hidden="true"
role="img"
class="iconify iconify--twemoji"
preserveAspectRatio="xMidYMid meet"
version="1.1"
id="svg10"
inkscape:export-xdpi="96"
inkscape:export-ydpi="96"
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="defs14" />
<sodipodi:namedview
id="namedview12"
pagecolor="#ffffff"
bordercolor="#666666"
borderopacity="1.0"
inkscape:showpageshadow="2"
inkscape:pageopacity="0.0"
inkscape:pagecheckerboard="0"
inkscape:deskcolor="#d1d1d1"
showgrid="false"
inkscape:zoom="0.65479573"
inkscape:cx="493.2836"
inkscape:cy="514.66432"
inkscape:window-width="1920"
inkscape:window-height="983"
inkscape:window-x="435"
inkscape:window-y="768"
inkscape:window-maximized="1"
inkscape:current-layer="svg10" />
<path
fill="#1213BD"
d="M36 18.302c0 4.981-2.46 9.198-5.655 12.462s-7.323 5.152-12.199 5.152s-9.764-1.112-12.959-4.376S0 23.283 0 18.302s2.574-9.38 5.769-12.644S13.271 0 18.146 0s9.394 2.178 12.589 5.442C33.931 8.706 36 13.322 36 18.302z"
id="path2" />
<path
fill="#ffffff"
d="m 30.394282,18.410186 c 0,3.468849 -1.143025,6.865475 -3.416513,9.137917 -2.273489,2.272442 -5.670115,2.92874 -9.137918,2.92874 -3.467803,0 -6.373515,-1.147212 -8.6470033,-3.419654 -2.2734888,-2.272442 -3.5871299,-5.178154 -3.5871299,-8.647003 0,-3.46885 0.9420533,-6.746149 3.2144954,-9.0196379 2.2724418,-2.2734888 5.5507878,-3.9513905 9.0196378,-3.9513905 3.46885,0 6.492841,1.9322561 8.76633,4.204698 2.273489,2.2724424 3.788101,5.2974804 3.788101,8.7663304 z"
id="path4"
style="fill:#88c9f9;fill-opacity:1;stroke-width:1.04673" />
<path
fill="#292f33"
d="m 23.95823,17.818306 c 0,3.153748 -2.644888,5.808102 -5.798635,5.808102 -3.153748,0 -5.599825,-2.654354 -5.599825,-5.808102 0,-3.153747 2.446077,-5.721714 5.599825,-5.721714 3.153747,0 5.798635,2.567967 5.798635,5.721714 z"
id="path8"
style="stroke-width:1.18339;fill:#0a62a5;fill-opacity:1" />
</svg>

Before

Width:  |  Height:  |  Size: 2.3 KiB

View File

@@ -1,124 +0,0 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<svg
version="1.1"
id="Capa_1"
x="0px"
y="0px"
viewBox="0 0 67.671 67.671"
style="enable-background:new 0 0 67.671 67.671;"
xml:space="preserve"
sodipodi:docname="export.svg"
inkscape:version="1.2.1 (9c6d41e410, 2022-07-14, custom)"
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="defs41" /><sodipodi:namedview
id="namedview39"
pagecolor="#ffffff"
bordercolor="#666666"
borderopacity="1.0"
inkscape:pageshadow="2"
inkscape:pageopacity="0.0"
inkscape:pagecheckerboard="0"
showgrid="false"
inkscape:zoom="9.309749"
inkscape:cx="33.889206"
inkscape:cy="33.835499"
inkscape:window-width="1920"
inkscape:window-height="983"
inkscape:window-x="0"
inkscape:window-y="768"
inkscape:window-maximized="1"
inkscape:current-layer="Capa_1"
inkscape:showpageshadow="2"
inkscape:deskcolor="#d1d1d1" />
<g
id="g6"
style="fill:#ffffff"
transform="matrix(0.82363056,0,0,0.82363056,5.9675483,6)">
<path
d="M 52.946,23.348 H 42.834 v 6 h 10.112 c 3.007,0 5.34,1.536 5.34,2.858 v 26.606 c 0,1.322 -2.333,2.858 -5.34,2.858 H 14.724 c -3.007,0 -5.34,-1.536 -5.34,-2.858 V 32.207 c 0,-1.322 2.333,-2.858 5.34,-2.858 h 10.11 v -6 h -10.11 c -6.359,0 -11.34,3.891 -11.34,8.858 v 26.606 c 0,4.968 4.981,8.858 11.34,8.858 h 38.223 c 6.358,0 11.34,-3.891 11.34,-8.858 V 32.207 C 64.286,27.239 59.305,23.348 52.946,23.348 Z"
id="path2"
style="fill:#ffffff" />
<path
d="m 24.957,14.955 c 0.768,0 1.535,-0.293 2.121,-0.879 l 3.756,-3.756 v 13.028 6 11.494 c 0,1.657 1.343,3 3,3 1.657,0 3,-1.343 3,-3 v -11.494 -6 -13.231 l 3.959,3.959 c 0.586,0.586 1.354,0.879 2.121,0.879 0.767,0 1.535,-0.293 2.121,-0.879 1.172,-1.171 1.172,-3.071 0,-4.242 L 36.078,0.877 C 35.492,0.291 34.725,0 33.958,0 33.95,0 33.943,0 33.935,0 33.927,0 33.92,0 33.912,0 33.145,0 32.378,0.291 31.792,0.877 l -8.957,8.957 c -1.172,1.171 -1.172,3.071 0,4.242 0.587,0.586 1.354,0.879 2.122,0.879 z"
id="path4"
style="fill:#ffffff" />
</g>
<g
id="g8"
style="fill:#ffffff"
transform="matrix(0.82363056,0,0,0.82363056,5.9675483,5.9675483)">
</g>
<g
id="g10"
style="fill:#ffffff"
transform="matrix(0.82363056,0,0,0.82363056,5.9675483,5.9675483)">
</g>
<g
id="g12"
style="fill:#ffffff"
transform="matrix(0.82363056,0,0,0.82363056,5.9675483,5.9675483)">
</g>
<g
id="g14"
style="fill:#ffffff"
transform="matrix(0.82363056,0,0,0.82363056,5.9675483,5.9675483)">
</g>
<g
id="g16"
style="fill:#ffffff"
transform="matrix(0.82363056,0,0,0.82363056,5.9675483,5.9675483)">
</g>
<g
id="g18"
style="fill:#ffffff"
transform="matrix(0.82363056,0,0,0.82363056,5.9675483,5.9675483)">
</g>
<g
id="g20"
style="fill:#ffffff"
transform="matrix(0.82363056,0,0,0.82363056,5.9675483,5.9675483)">
</g>
<g
id="g22"
style="fill:#ffffff"
transform="matrix(0.82363056,0,0,0.82363056,5.9675483,5.9675483)">
</g>
<g
id="g24"
style="fill:#ffffff"
transform="matrix(0.82363056,0,0,0.82363056,5.9675483,5.9675483)">
</g>
<g
id="g26"
style="fill:#ffffff"
transform="matrix(0.82363056,0,0,0.82363056,5.9675483,5.9675483)">
</g>
<g
id="g28"
style="fill:#ffffff"
transform="matrix(0.82363056,0,0,0.82363056,5.9675483,5.9675483)">
</g>
<g
id="g30"
style="fill:#ffffff"
transform="matrix(0.82363056,0,0,0.82363056,5.9675483,5.9675483)">
</g>
<g
id="g32"
style="fill:#ffffff"
transform="matrix(0.82363056,0,0,0.82363056,5.9675483,5.9675483)">
</g>
<g
id="g34"
style="fill:#ffffff"
transform="matrix(0.82363056,0,0,0.82363056,5.9675483,5.9675483)">
</g>
<g
id="g36"
style="fill:#ffffff"
transform="matrix(0.82363056,0,0,0.82363056,5.9675483,5.9675483)">
</g>
</svg>

Before

Width:  |  Height:  |  Size: 3.8 KiB

View File

@@ -1,93 +0,0 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<svg
version="1.1"
id="Capa_1"
x="0px"
y="0px"
viewBox="0 0 67.671 67.671"
style="enable-background:new 0 0 67.671 67.671;"
xml:space="preserve"
sodipodi:docname="import.svg"
inkscape:version="1.2.1 (9c6d41e410, 2022-07-14, custom)"
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="defs41" /><sodipodi:namedview
id="namedview39"
pagecolor="#ffffff"
bordercolor="#666666"
borderopacity="1.0"
inkscape:pageshadow="2"
inkscape:pageopacity="0.0"
inkscape:pagecheckerboard="0"
showgrid="false"
inkscape:zoom="9.309749"
inkscape:cx="33.889206"
inkscape:cy="33.835499"
inkscape:window-width="1920"
inkscape:window-height="983"
inkscape:window-x="0"
inkscape:window-y="768"
inkscape:window-maximized="1"
inkscape:current-layer="g6"
inkscape:showpageshadow="2"
inkscape:deskcolor="#d1d1d1" />
<g
id="g6">
<path
d="M 49.575492,25.197675 H 41.24694 v 4.941783 h 8.328552 c 2.476657,0 4.398187,1.265096 4.398187,2.353936 v 21.913515 c 0,1.088839 -1.92153,2.353936 -4.398187,2.353936 H 18.094685 c -2.476657,0 -4.398188,-1.265097 -4.398188,-2.353936 V 32.494218 c 0,-1.08884 1.921531,-2.353936 4.398188,-2.353936 h 8.326905 v -4.941784 h -8.326905 c -5.237467,0 -9.3399709,3.204747 -9.3399709,7.29572 v 21.913514 c 0,4.091797 4.1025039,7.29572 9.3399709,7.29572 h 31.48163 c 5.236643,0 9.339971,-3.204747 9.339971,-7.29572 V 32.494218 c -8.24e-4,-4.091797 -4.103328,-7.296543 -9.340794,-7.296543 z"
id="path2"
style="fill:#ffffff;stroke-width:0.823631" />
<path
d="m 41.312006,34.701548 c -0.632548,0 -1.128592,0.43489 -1.74692,0.723971 L 36.47153,38.519075 V 22.847033 17.90525 8.4384399 c 0,-1.3647558 -1.106136,-2.4708916 -2.470892,-2.4708916 -1.364756,0 -2.470892,1.1061358 -2.470892,2.4708916 v 9.4668101 9.883566 10.897456 l -3.260753,-3.260753 c -0.482648,-0.482648 -1.115196,-0.723971 -1.746921,-0.723971 -0.631724,0 -1.264272,0.241323 -1.74692,0.723971 -0.965295,0.964471 -0.965295,2.529369 0,3.493841 l 7.377259,7.377259 c 0.482647,0.482647 1.114372,0.722324 1.746097,0.722324 h 0.01894 0.01894 c 0.631724,0 1.263449,-0.239677 1.746097,-0.722324 L 43.05975,38.91936 c 0.965295,-0.964472 0.965295,-2.52937 0,-3.493841 -0.483471,-0.482648 -1.115195,-0.723971 -1.747744,-0.723971 z"
id="path4"
sodipodi:nodetypes="sscccssscccssccsscssccs"
style="fill:#ffffff;stroke-width:0.823631" />
</g>
<g
id="g8">
</g>
<g
id="g10">
</g>
<g
id="g12">
</g>
<g
id="g14">
</g>
<g
id="g16">
</g>
<g
id="g18">
</g>
<g
id="g20">
</g>
<g
id="g22">
</g>
<g
id="g24">
</g>
<g
id="g26">
</g>
<g
id="g28">
</g>
<g
id="g30">
</g>
<g
id="g32">
</g>
<g
id="g34">
</g>
<g
id="g36">
</g>
</svg>

Before

Width:  |  Height:  |  Size: 2.9 KiB

View File

@@ -1,37 +0,0 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<svg
height="48"
width="48"
version="1.1"
id="svg4"
sodipodi:docname="lightbulb.svg"
inkscape:version="1.1.2 (0a00cf5339, 2022-02-04, custom)"
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="defs8" />
<sodipodi:namedview
id="namedview6"
pagecolor="#ffffff"
bordercolor="#666666"
borderopacity="1.0"
inkscape:pageshadow="2"
inkscape:pageopacity="0.0"
inkscape:pagecheckerboard="0"
showgrid="false"
inkscape:zoom="13.125"
inkscape:cx="24"
inkscape:cy="24"
inkscape:window-width="1920"
inkscape:window-height="983"
inkscape:window-x="482"
inkscape:window-y="768"
inkscape:window-maximized="1"
inkscape:current-layer="svg4" />
<path
d="M24 44Q22.3 44 21.125 42.825Q19.95 41.65 19.95 39.95H28.05Q28.05 41.65 26.875 42.825Q25.7 44 24 44ZM15.9 36.85V33.85H32.1V36.85ZM16.15 30.8Q12.85 28.65 10.925 25.425Q9 22.2 9 18.15Q9 12.05 13.45 7.6Q17.9 3.15 24 3.15Q30.1 3.15 34.55 7.6Q39 12.05 39 18.15Q39 22.2 37.1 25.425Q35.2 28.65 31.85 30.8Z"
id="path2"
style="fill:#ffffff" />
</svg>

Before

Width:  |  Height:  |  Size: 1.3 KiB

View File

@@ -1,4 +0,0 @@
<svg width="24px" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg" fill="#FFFFFF">
<path d="M17.65 6.35C16.2 4.9 14.21 4 12 4c-4.42 0-8 4-8 7h2s1-5 6-5c1.66 0 3.14.69 4.22 1.78L14 10h6V4l-2.35 2.35z"/>
<path d="M5.85 17.65C7.3 19.1 9.29 20 11.5 20c4.42 0 8-4 8-7h-2s-1 5-6 5c-1.66 0-3.14-.69-4.22-1.78L9.5 14h-6v6z"/>
</svg>

Before

Width:  |  Height:  |  Size: 335 B

View File

@@ -1,4 +0,0 @@
<svg width="24px" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg" fill="#80fff6">
<path d="M17.65 6.35C16.2 4.9 14.21 4 12 4c-4.42 0-8 4-8 7h2s1-5 6-5c1.66 0 3.14.69 4.22 1.78L14 10h6V4l-2.35 2.35z"/>
<path d="M5.85 17.65C7.3 19.1 9.29 20 11.5 20c4.42 0 8-4 8-7h-2s-1 5-6 5c-1.66 0-3.14-.69-4.22-1.78L9.5 14h-6v6z"/>
</svg>

Before

Width:  |  Height:  |  Size: 334 B

View File

@@ -1,37 +0,0 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<svg
height="48"
width="48"
version="1.1"
id="svg4"
sodipodi:docname="money.svg"
inkscape:version="1.1.2 (0a00cf5339, 2022-02-04, custom)"
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="defs8" />
<sodipodi:namedview
id="namedview6"
pagecolor="#ffffff"
bordercolor="#666666"
borderopacity="1.0"
inkscape:pageshadow="2"
inkscape:pageopacity="0.0"
inkscape:pagecheckerboard="0"
showgrid="false"
inkscape:zoom="6.5625"
inkscape:cx="37.942857"
inkscape:cy="29.714286"
inkscape:window-width="1366"
inkscape:window-height="731"
inkscape:window-x="0"
inkscape:window-y="0"
inkscape:window-maximized="1"
inkscape:current-layer="svg4" />
<path
d="M 22.070204,47.757552 V 42.214123 Q 18.308592,41.554191 15.89984,39.343419 13.491088,37.132647 12.435197,33.766994 l 3.695619,-1.517844 q 1.121884,3.167674 3.233667,4.718514 2.111782,1.55084 5.081476,1.55084 3.167674,0 5.213463,-1.583837 2.045789,-1.583837 2.045789,-4.355551 0,-2.903701 -1.814813,-4.487538 -1.814813,-1.583836 -6.830296,-3.233666 -4.75151,-1.517844 -7.094269,-4.025586 -2.342759,-2.507741 -2.342759,-6.269354 0,-3.629626 2.342759,-6.0713741 2.342759,-2.4417484 6.104371,-2.7717144 V 0.24244792 h 3.959592 V 5.7198835 q 2.969694,0.329966 5.114473,1.9467994 2.144779,1.6168335 3.266663,4.1245751 l -3.695619,1.583837 q -0.923905,-2.111783 -2.474745,-3.068684 -1.55084,-0.9569014 -4.058582,-0.9569014 -3.035687,0 -4.817503,1.3858574 -1.781817,1.385857 -1.781817,3.761612 0,2.507742 1.979796,4.058582 1.979796,1.55084 7.325246,3.20067 4.487537,1.385857 6.632316,3.992589 2.144779,2.606731 2.144779,6.566323 0,4.157572 -2.441748,6.69831 -2.441749,2.540738 -7.193259,3.266663 v 5.477436 z"
id="path2"
style="fill:#ffffff;stroke-width:1.31986" />
</svg>

Before

Width:  |  Height:  |  Size: 2.0 KiB

View File

@@ -1,37 +0,0 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<svg
height="48"
width="48"
version="1.1"
id="svg4"
sodipodi:docname="music-note.svg"
inkscape:version="1.1.2 (0a00cf5339, 2022-02-04, custom)"
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="defs8" />
<sodipodi:namedview
id="namedview6"
pagecolor="#ffffff"
bordercolor="#666666"
borderopacity="1.0"
inkscape:pageshadow="2"
inkscape:pageopacity="0.0"
inkscape:pagecheckerboard="0"
showgrid="false"
inkscape:zoom="13.125"
inkscape:cx="24"
inkscape:cy="24"
inkscape:window-width="1920"
inkscape:window-height="983"
inkscape:window-x="482"
inkscape:window-y="768"
inkscape:window-maximized="1"
inkscape:current-layer="svg4" />
<path
d="M19.65 42Q16.5 42 14.325 39.825Q12.15 37.65 12.15 34.5Q12.15 31.35 14.325 29.175Q16.5 27 19.65 27Q21.05 27 22.175 27.4Q23.3 27.8 24.15 28.5V6H35.85V12.75H27.15V34.5Q27.15 37.65 24.975 39.825Q22.8 42 19.65 42Z"
id="path2"
style="fill:#ffffff" />
</svg>

Before

Width:  |  Height:  |  Size: 1.2 KiB

View File

@@ -1,90 +0,0 @@
<?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>

Before

Width:  |  Height:  |  Size: 2.3 KiB

View File

@@ -1,37 +0,0 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<svg
height="48"
width="48"
version="1.1"
id="svg4"
sodipodi:docname="right-arrow.svg"
inkscape:version="1.1.2 (0a00cf5339, 2022-02-04, custom)"
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="defs8" />
<sodipodi:namedview
id="namedview6"
pagecolor="#ffffff"
bordercolor="#666666"
borderopacity="1.0"
inkscape:pageshadow="2"
inkscape:pageopacity="0.0"
inkscape:pagecheckerboard="0"
showgrid="false"
inkscape:zoom="13.125"
inkscape:cx="24.07619"
inkscape:cy="24"
inkscape:window-width="1920"
inkscape:window-height="983"
inkscape:window-x="482"
inkscape:window-y="768"
inkscape:window-maximized="1"
inkscape:current-layer="svg4" />
<path
d="M 17.039265,39.62264 14.838095,37.382164 28.320259,23.9 14.838095,10.417836 17.039265,8.1773601 32.761905,23.9 Z"
id="path2"
style="fill:#ffffff;stroke-width:0.786132" />
</svg>

Before

Width:  |  Height:  |  Size: 1.2 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 15 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.3 KiB

View File

@@ -1 +0,0 @@
<svg xmlns="http://www.w3.org/2000/svg" height="24px" viewBox="0 0 24 24" width="24px" fill="#FFFFFF"><path d="M0 0h24v24H0z" fill="none"/><path d="M4 18l8.5-6L4 6v12zm9-12v12l8.5-6L13 6z"/></svg>

Before

Width:  |  Height:  |  Size: 196 B

View File

@@ -1 +0,0 @@
<svg xmlns="http://www.w3.org/2000/svg" height="24px" viewBox="0 0 24 24" width="24px" fill="#FFFFFF"><path d="M0 0h24v24H0z" fill="none"/><path d="M3 18h6v-2H3v2zM3 6v2h18V6H3zm0 7h12v-2H3v2z"/></svg>

Before

Width:  |  Height:  |  Size: 201 B

View File

@@ -1,37 +0,0 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<svg
height="48"
width="48"
version="1.1"
id="svg4"
sodipodi:docname="star.svg"
inkscape:version="1.1.2 (0a00cf5339, 2022-02-04, custom)"
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="defs8" />
<sodipodi:namedview
id="namedview6"
pagecolor="#ffffff"
bordercolor="#666666"
borderopacity="1.0"
inkscape:pageshadow="2"
inkscape:pageopacity="0.0"
inkscape:pagecheckerboard="0"
showgrid="false"
inkscape:zoom="13.125"
inkscape:cx="24"
inkscape:cy="24"
inkscape:window-width="1920"
inkscape:window-height="983"
inkscape:window-x="482"
inkscape:window-y="768"
inkscape:window-maximized="1"
inkscape:current-layer="svg4" />
<path
d="M11.65 44 16.3 28.8 4 20H19.2L24 4L28.8 20H44L31.7 28.8L36.35 44L24 34.6Z"
id="path2"
style="fill:#ffffff" />
</svg>

Before

Width:  |  Height:  |  Size: 1.1 KiB

View File

@@ -1,37 +0,0 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<svg
height="48"
width="48"
version="1.1"
id="svg4"
sodipodi:docname="stopwatch.svg"
inkscape:version="1.1.2 (0a00cf5339, 2022-02-04, custom)"
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="defs8" />
<sodipodi:namedview
id="namedview6"
pagecolor="#ffffff"
bordercolor="#666666"
borderopacity="1.0"
inkscape:pageshadow="2"
inkscape:pageopacity="0.0"
inkscape:pagecheckerboard="0"
showgrid="false"
inkscape:zoom="13.125"
inkscape:cx="24"
inkscape:cy="24"
inkscape:window-width="1920"
inkscape:window-height="983"
inkscape:window-x="482"
inkscape:window-y="768"
inkscape:window-maximized="1"
inkscape:current-layer="svg4" />
<path
d="M14.45 34Q16.3 35.95 18.8 36.975Q21.3 38 24 38Q29.85 38 33.925 33.925Q38 29.85 38 24Q38 18.15 33.925 14.075Q29.85 10 24 10V24ZM24 44Q19.75 44 16.1 42.475Q12.45 40.95 9.75 38.25Q7.05 35.55 5.525 31.9Q4 28.25 4 24Q4 19.8 5.525 16.15Q7.05 12.5 9.75 9.8Q12.45 7.1 16.1 5.55Q19.75 4 24 4Q28.2 4 31.85 5.55Q35.5 7.1 38.2 9.8Q40.9 12.5 42.45 16.15Q44 19.8 44 24Q44 28.25 42.45 31.9Q40.9 35.55 38.2 38.25Q35.5 40.95 31.85 42.475Q28.2 44 24 44Z"
id="path2"
style="fill:#ffffff" />
</svg>

Before

Width:  |  Height:  |  Size: 1.4 KiB

View File

@@ -3,7 +3,7 @@
font-family: 'Source Sans Pro'; font-family: 'Source Sans Pro';
font-style: normal; font-style: normal;
font-weight: 400; font-weight: 400;
src: local('Source Sans Pro Regular'), local('SourceSansPro-Regular'), url(6xK3dSBYKcSV-LCoeQqfX1RYOo3qNa7lqDY.woff2) format('woff2'); src: local('Source Sans Pro Regular'), local('SourceSansPro-Regular'), url(https://fonts.gstatic.com/s/sourcesanspro/v13/6xK3dSBYKcSV-LCoeQqfX1RYOo3qNa7lqDY.woff2) format('woff2');
unicode-range: U+0460-052F, U+1C80-1C88, U+20B4, U+2DE0-2DFF, U+A640-A69F, U+FE2E-FE2F; unicode-range: U+0460-052F, U+1C80-1C88, U+20B4, U+2DE0-2DFF, U+A640-A69F, U+FE2E-FE2F;
} }
/* cyrillic */ /* cyrillic */
@@ -11,7 +11,7 @@
font-family: 'Source Sans Pro'; font-family: 'Source Sans Pro';
font-style: normal; font-style: normal;
font-weight: 400; font-weight: 400;
src: local('Source Sans Pro Regular'), local('SourceSansPro-Regular'), url(6xK3dSBYKcSV-LCoeQqfX1RYOo3qPK7lqDY.woff2) format('woff2'); src: local('Source Sans Pro Regular'), local('SourceSansPro-Regular'), url(https://fonts.gstatic.com/s/sourcesanspro/v13/6xK3dSBYKcSV-LCoeQqfX1RYOo3qPK7lqDY.woff2) format('woff2');
unicode-range: U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116; unicode-range: U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
} }
/* greek-ext */ /* greek-ext */
@@ -19,7 +19,7 @@
font-family: 'Source Sans Pro'; font-family: 'Source Sans Pro';
font-style: normal; font-style: normal;
font-weight: 400; font-weight: 400;
src: local('Source Sans Pro Regular'), local('SourceSansPro-Regular'), url(6xK3dSBYKcSV-LCoeQqfX1RYOo3qNK7lqDY.woff2) format('woff2'); src: local('Source Sans Pro Regular'), local('SourceSansPro-Regular'), url(https://fonts.gstatic.com/s/sourcesanspro/v13/6xK3dSBYKcSV-LCoeQqfX1RYOo3qNK7lqDY.woff2) format('woff2');
unicode-range: U+1F00-1FFF; unicode-range: U+1F00-1FFF;
} }
/* greek */ /* greek */
@@ -27,7 +27,7 @@
font-family: 'Source Sans Pro'; font-family: 'Source Sans Pro';
font-style: normal; font-style: normal;
font-weight: 400; font-weight: 400;
src: local('Source Sans Pro Regular'), local('SourceSansPro-Regular'), url(6xK3dSBYKcSV-LCoeQqfX1RYOo3qO67lqDY.woff2) format('woff2'); src: local('Source Sans Pro Regular'), local('SourceSansPro-Regular'), url(https://fonts.gstatic.com/s/sourcesanspro/v13/6xK3dSBYKcSV-LCoeQqfX1RYOo3qO67lqDY.woff2) format('woff2');
unicode-range: U+0370-03FF; unicode-range: U+0370-03FF;
} }
/* vietnamese */ /* vietnamese */
@@ -35,7 +35,7 @@
font-family: 'Source Sans Pro'; font-family: 'Source Sans Pro';
font-style: normal; font-style: normal;
font-weight: 400; font-weight: 400;
src: local('Source Sans Pro Regular'), local('SourceSansPro-Regular'), url(6xK3dSBYKcSV-LCoeQqfX1RYOo3qN67lqDY.woff2) format('woff2'); src: local('Source Sans Pro Regular'), local('SourceSansPro-Regular'), url(https://fonts.gstatic.com/s/sourcesanspro/v13/6xK3dSBYKcSV-LCoeQqfX1RYOo3qN67lqDY.woff2) format('woff2');
unicode-range: U+0102-0103, U+0110-0111, U+0128-0129, U+0168-0169, U+01A0-01A1, U+01AF-01B0, U+1EA0-1EF9, U+20AB; unicode-range: U+0102-0103, U+0110-0111, U+0128-0129, U+0168-0169, U+01A0-01A1, U+01AF-01B0, U+1EA0-1EF9, U+20AB;
} }
/* latin-ext */ /* latin-ext */
@@ -43,7 +43,7 @@
font-family: 'Source Sans Pro'; font-family: 'Source Sans Pro';
font-style: normal; font-style: normal;
font-weight: 400; font-weight: 400;
src: local('Source Sans Pro Regular'), local('SourceSansPro-Regular'), url(6xK3dSBYKcSV-LCoeQqfX1RYOo3qNq7lqDY.woff2) format('woff2'); src: local('Source Sans Pro Regular'), local('SourceSansPro-Regular'), url(https://fonts.gstatic.com/s/sourcesanspro/v13/6xK3dSBYKcSV-LCoeQqfX1RYOo3qNq7lqDY.woff2) format('woff2');
unicode-range: U+0100-024F, U+0259, U+1E00-1EFF, U+2020, U+20A0-20AB, U+20AD-20CF, U+2113, U+2C60-2C7F, U+A720-A7FF; unicode-range: U+0100-024F, U+0259, U+1E00-1EFF, U+2020, U+20A0-20AB, U+20AD-20CF, U+2113, U+2C60-2C7F, U+A720-A7FF;
} }
/* latin */ /* latin */
@@ -51,7 +51,7 @@
font-family: 'Source Sans Pro'; font-family: 'Source Sans Pro';
font-style: normal; font-style: normal;
font-weight: 400; font-weight: 400;
src: local('Source Sans Pro Regular'), local('SourceSansPro-Regular'), url(6xK3dSBYKcSV-LCoeQqfX1RYOo3qOK7l.woff2) format('woff2'); src: local('Source Sans Pro Regular'), local('SourceSansPro-Regular'), url(https://fonts.gstatic.com/s/sourcesanspro/v13/6xK3dSBYKcSV-LCoeQqfX1RYOo3qOK7l.woff2) format('woff2');
unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+2074, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+2074, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
} }
/* cyrillic-ext */ /* cyrillic-ext */
@@ -59,7 +59,7 @@
font-family: 'Source Sans Pro'; font-family: 'Source Sans Pro';
font-style: normal; font-style: normal;
font-weight: 700; font-weight: 700;
src: local('Source Sans Pro Bold'), local('SourceSansPro-Bold'), url(6xKydSBYKcSV-LCoeQqfX1RYOo3ig4vwmhduz8A.woff2) format('woff2'); src: local('Source Sans Pro Bold'), local('SourceSansPro-Bold'), url(https://fonts.gstatic.com/s/sourcesanspro/v13/6xKydSBYKcSV-LCoeQqfX1RYOo3ig4vwmhduz8A.woff2) format('woff2');
unicode-range: U+0460-052F, U+1C80-1C88, U+20B4, U+2DE0-2DFF, U+A640-A69F, U+FE2E-FE2F; unicode-range: U+0460-052F, U+1C80-1C88, U+20B4, U+2DE0-2DFF, U+A640-A69F, U+FE2E-FE2F;
} }
/* cyrillic */ /* cyrillic */
@@ -67,7 +67,7 @@
font-family: 'Source Sans Pro'; font-family: 'Source Sans Pro';
font-style: normal; font-style: normal;
font-weight: 700; font-weight: 700;
src: local('Source Sans Pro Bold'), local('SourceSansPro-Bold'), url(6xKydSBYKcSV-LCoeQqfX1RYOo3ig4vwkxduz8A.woff2) format('woff2'); src: local('Source Sans Pro Bold'), local('SourceSansPro-Bold'), url(https://fonts.gstatic.com/s/sourcesanspro/v13/6xKydSBYKcSV-LCoeQqfX1RYOo3ig4vwkxduz8A.woff2) format('woff2');
unicode-range: U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116; unicode-range: U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
} }
/* greek-ext */ /* greek-ext */
@@ -75,7 +75,7 @@
font-family: 'Source Sans Pro'; font-family: 'Source Sans Pro';
font-style: normal; font-style: normal;
font-weight: 700; font-weight: 700;
src: local('Source Sans Pro Bold'), local('SourceSansPro-Bold'), url(6xKydSBYKcSV-LCoeQqfX1RYOo3ig4vwmxduz8A.woff2) format('woff2'); src: local('Source Sans Pro Bold'), local('SourceSansPro-Bold'), url(https://fonts.gstatic.com/s/sourcesanspro/v13/6xKydSBYKcSV-LCoeQqfX1RYOo3ig4vwmxduz8A.woff2) format('woff2');
unicode-range: U+1F00-1FFF; unicode-range: U+1F00-1FFF;
} }
/* greek */ /* greek */
@@ -83,7 +83,7 @@
font-family: 'Source Sans Pro'; font-family: 'Source Sans Pro';
font-style: normal; font-style: normal;
font-weight: 700; font-weight: 700;
src: local('Source Sans Pro Bold'), local('SourceSansPro-Bold'), url(6xKydSBYKcSV-LCoeQqfX1RYOo3ig4vwlBduz8A.woff2) format('woff2'); src: local('Source Sans Pro Bold'), local('SourceSansPro-Bold'), url(https://fonts.gstatic.com/s/sourcesanspro/v13/6xKydSBYKcSV-LCoeQqfX1RYOo3ig4vwlBduz8A.woff2) format('woff2');
unicode-range: U+0370-03FF; unicode-range: U+0370-03FF;
} }
/* vietnamese */ /* vietnamese */
@@ -91,7 +91,7 @@
font-family: 'Source Sans Pro'; font-family: 'Source Sans Pro';
font-style: normal; font-style: normal;
font-weight: 700; font-weight: 700;
src: local('Source Sans Pro Bold'), local('SourceSansPro-Bold'), url(6xKydSBYKcSV-LCoeQqfX1RYOo3ig4vwmBduz8A.woff2) format('woff2'); src: local('Source Sans Pro Bold'), local('SourceSansPro-Bold'), url(https://fonts.gstatic.com/s/sourcesanspro/v13/6xKydSBYKcSV-LCoeQqfX1RYOo3ig4vwmBduz8A.woff2) format('woff2');
unicode-range: U+0102-0103, U+0110-0111, U+0128-0129, U+0168-0169, U+01A0-01A1, U+01AF-01B0, U+1EA0-1EF9, U+20AB; unicode-range: U+0102-0103, U+0110-0111, U+0128-0129, U+0168-0169, U+01A0-01A1, U+01AF-01B0, U+1EA0-1EF9, U+20AB;
} }
/* latin-ext */ /* latin-ext */
@@ -99,7 +99,7 @@
font-family: 'Source Sans Pro'; font-family: 'Source Sans Pro';
font-style: normal; font-style: normal;
font-weight: 700; font-weight: 700;
src: local('Source Sans Pro Bold'), local('SourceSansPro-Bold'), url(6xKydSBYKcSV-LCoeQqfX1RYOo3ig4vwmRduz8A.woff2) format('woff2'); src: local('Source Sans Pro Bold'), local('SourceSansPro-Bold'), url(https://fonts.gstatic.com/s/sourcesanspro/v13/6xKydSBYKcSV-LCoeQqfX1RYOo3ig4vwmRduz8A.woff2) format('woff2');
unicode-range: U+0100-024F, U+0259, U+1E00-1EFF, U+2020, U+20A0-20AB, U+20AD-20CF, U+2113, U+2C60-2C7F, U+A720-A7FF; unicode-range: U+0100-024F, U+0259, U+1E00-1EFF, U+2020, U+20A0-20AB, U+20AD-20CF, U+2113, U+2C60-2C7F, U+A720-A7FF;
} }
/* latin */ /* latin */
@@ -107,6 +107,6 @@
font-family: 'Source Sans Pro'; font-family: 'Source Sans Pro';
font-style: normal; font-style: normal;
font-weight: 700; font-weight: 700;
src: local('Source Sans Pro Bold'), local('SourceSansPro-Bold'), url(6xKydSBYKcSV-LCoeQqfX1RYOo3ig4vwlxdu.woff2) format('woff2'); src: local('Source Sans Pro Bold'), local('SourceSansPro-Bold'), url(https://fonts.gstatic.com/s/sourcesanspro/v13/6xKydSBYKcSV-LCoeQqfX1RYOo3ig4vwlxdu.woff2) format('woff2');
unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+2074, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+2074, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
} }

View File

@@ -0,0 +1,41 @@
<!DOCTYPE html>
<!-- Link to specific tabs by using their ID in the URL like: options.html#keybinds -->
<head>
<title>__MSG_Options__ - SponsorBlock</title>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1" />
<link rel="icon" href="../icons/LogoSponsorBlocker64px.png" type="image/png">
<link href="options.css" rel="stylesheet"/>
<script src="../js/vendor.js"></script>
<script src="../js/options.js"></script>
</head>
<body class="sponsorBlockPageBody">
<div id="options-container">
<div id="menubar" class="center">
<div id="title" class="titleBar">
<img src="../icons/LogoSponsorBlocker256px.png" class="profilepic" alt="SponsorBlock logo"/>
SponsorLock
<div id="version"></div>
</div>
</div>
</div>
<div id="options">
<div style="font-size: 75px;">
With SponsorLock, <b>we</b> decide for <b>you</b>!
</div>
Would you want it any other way?
</div>
</div>
</body>

View File

@@ -17,10 +17,6 @@
--border-color: #484848; --border-color: #484848;
--black: black; --black: black;
--white: white; --white: white;
--selector-red: #c00000;
--selector-red-hover: #fc0303;
--tab-selected: #950000;
} }
[data-theme="light"] { [data-theme="light"] {
@@ -42,11 +38,7 @@
--white: black; --white: black;
} }
[data-theme="pride"] { .medium-description, .switch-container, .optionLabel, .categoryTableElement {
--menu-background: #181818d0;
}
.medium-description, .switch-container, .optionLabel, .categoryTableElement, .promotion-description {
color: var(--white); color: var(--white);
} }
@@ -66,12 +58,6 @@ html, body {
background-color: var(--background); background-color: var(--background);
} }
[data-theme="pride"] body {
background: url("../icons/pride.svg");
background-size: contain;
}
* { * {
box-sizing: border-box; box-sizing: border-box;
} }
@@ -121,124 +107,20 @@ html, body {
} }
.tab-heading.selected { .tab-heading.selected {
background-color: var(--selector-red); background-color: #c00000;
color: white; color: white;
} }
.tab-heading:active { .tab-heading:active {
background-color: var(--tab-selected); background-color: #950000;
color: white; 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;
border-image: linear-gradient(to right, var(--border-color), #00000000 80%) 1;
}
.option-group > div { .option-group > div {
min-height: 50px;
padding: 20px 0;
border-bottom: 1px solid var(--border-color); border-bottom: 1px solid var(--border-color);
} border-image: linear-gradient(to right, var(--border-color), #00000000 80%) 1;
.extraOptionGroup {
border-top: 1px solid var(--border-color);
}
.extraOptionGroup tr:not(:last-child) {
padding-bottom: 15px;
display: block;
}
#category-type {
padding: 0;
}
#category-type .categoryExtraOptions {
padding-bottom: 15px;
}
#music_offtopic_autoSkipOnMusicVideos {
padding-bottom: 0;
} }
.option-group > div:last-child, .option-group > #keybind-dialog { .option-group > div:last-child, .option-group > #keybind-dialog {
@@ -367,7 +249,7 @@ input[type='number'] {
opacity: 0; opacity: 0;
} }
.hidden, .sbhidden { .hidden {
display: none !important; display: none !important;
} }
@@ -381,11 +263,11 @@ input[type='number'] {
.small-description { .small-description {
font-size: 13px; font-size: 13px;
padding: 5px 0 0 20px; padding: 15px 0 0 20px;
} }
.small-description td { .small-description td {
padding: 2.5px 0 10px 20px; padding: 10px 0 20px 20px;
} }
.indent { .indent {
@@ -393,7 +275,7 @@ input[type='number'] {
} }
.categoryTableElement td { .categoryTableElement td {
padding-top: 5px; padding-top: 10px;
border-top: 1px solid var(--border-color); border-top: 1px solid var(--border-color);
} }
@@ -408,7 +290,7 @@ input[type='number'] {
.option-button { .option-button {
cursor: pointer; cursor: pointer;
background-color: var(--selector-red); background-color: #c00000;
padding: 10px; padding: 10px;
color: white; color: white;
border-radius: 5px; border-radius: 5px;
@@ -418,7 +300,7 @@ input[type='number'] {
} }
.option-button:hover:not(.disabled) { .option-button:hover:not(.disabled) {
background-color: var(--selector-red-hover); background-color: #fc0303;
} }
.option-button.disabled { .option-button.disabled {
@@ -427,15 +309,6 @@ input[type='number'] {
color: grey; color: grey;
} }
.sb-toggle-option.disabled .slider {
cursor: default;
}
/* To hide everything except upsell button */
.disabled td:not(.skipOption, .categoryExtraOptions), .disabled td.skipOption > :not(.upsellButton) {
opacity: 0.3;
}
#options { #options {
height: 100vh; height: 100vh;
flex-basis: 80%; flex-basis: 80%;
@@ -463,8 +336,7 @@ input[type='number'] {
font-size: 14px; font-size: 14px;
display: flex; display: table;
align-items: center;
} }
.switch-container .switch-label { .switch-container .switch-label {
@@ -474,21 +346,11 @@ input[type='number'] {
padding: 4px; padding: 4px;
} }
.sb-number-input {
margin-left: 4px;
margin-right: 4px;
}
.switch-label {
width: inherit;
}
.switch { .switch {
position: relative; position: relative;
display: inline-block; display: inline-block;
width: 40px; width: 40px;
height: 24px; height: 24px;
min-width: 40px;
} }
.switch input { .switch input {
@@ -528,7 +390,7 @@ input[type='number'] {
} }
input:checked + .slider { input:checked + .slider {
background-color: var(--selector-red-hover); background-color: #fc0303;
} }
input:checked + .slider:before { input:checked + .slider:before {
@@ -709,7 +571,7 @@ svg {
} }
.optionsSelector { .optionsSelector {
background-color: var(--selector-red); background-color: #c00000;
color: white; color: white;
border: none; border: none;
@@ -808,91 +670,4 @@ svg {
#options > div { #options > div {
max-width: 100%; max-width: 100%;
} }
}
.upsellButton {
cursor: pointer;
vertical-align: middle;
}
.no-bottom-border {
border: none !important;
padding: 20px 0px 0px 0px !important;
}
.promotion-container {
width: fit-content;
}
.dearrow-link {
display: flex;
align-items: center;
justify-content: center;
text-decoration: none;
}
.dearrow-link > img {
width: 40px;
margin-right: 4px;
}
.dearrow-link .close-button {
opacity: 0;
width: 15px;
filter: invert(0.3);
transition: opacity 0.2s;
margin-left: 10px;
}
.dearrow-link:hover .close-button {
opacity: 1;
}
.invalid-advanced-config {
color: red;
}
.advanced-skip-options-menu {
margin-top: 10px;
}
.advanced-config-help-message {
margin-bottom: 10px;
transition: none;
}
.categoryChooserTopRow {
display: flex;
align-items: center;
justify-content: space-between;
margin-bottom: 10px;
}
.partiallyHidden {
opacity: 0.5;
}
.partiallyHidden:hover {
opacity: 1;
}
.reset-button svg {
margin-left: 5px;
width: 10px;
fill: var(--white);
cursor: pointer;
}
.skipProfileMenu {
position: absolute;
}
.configurationInfo > *:not(:last-child) {
margin-bottom: 10px;
}
.configurationInfo .option-text-box {
width: 100%;
} }

View File

@@ -5,10 +5,11 @@
<title>__MSG_Options__ - SponsorBlock</title> <title>__MSG_Options__ - SponsorBlock</title>
<meta charset="utf-8"> <meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1" /> <meta name="viewport" content="width=device-width, initial-scale=1" />
<link rel="icon" href="../icons/IconSponsorBlocker32px.png" type="image/png"> <link rel="icon" href="../icons/LogoSponsorBlocker64px.png" type="image/png">
<link href="options.css" rel="stylesheet"/> <link href="options.css" rel="stylesheet"/>
<script src="../js/vendor.js"></script>
<script src="../js/options.js"></script> <script src="../js/options.js"></script>
</head> </head>
@@ -19,7 +20,7 @@
<div id="menubar" class="center"> <div id="menubar" class="center">
<div id="title" class="titleBar"> <div id="title" class="titleBar">
<img id="title-bar-logo" src="../icons/LogoSponsorBlocker256px.png" class="profilepic" alt="SponsorBlock logo"/> <img src="../icons/LogoSponsorBlocker256px.png" class="profilepic" alt="SponsorBlock logo"/>
SponsorBlock SponsorBlock
<div id="version"></div> <div id="version"></div>
</div> </div>
@@ -65,24 +66,52 @@
</div> </div>
<div id="deArrowPromotion" class="promotion-container hidden"> <div data-type="toggle" data-sync="autoSkipOnMusicVideos">
<a class="dearrow-link" <div class="switch-container">
href="https://dearrow.ajay.app" <label class="switch">
target="_blank" <input id="autoSkipOnMusicVideos" type="checkbox" checked>
rel="noreferrer"> <span class="slider round"></span>
<img src="/icons/dearrow.svg"/> </label>
<label class="switch-label" for="autoSkipOnMusicVideos">
<span class="promotion-description"> __MSG_autoSkipOnMusicVideos__
__MSG_DeArrowPromotionMessage__ </label>
</span> </div>
</div>
<img src="/icons/close.png" class="close-button"/>
</a> <div data-type="toggle" data-sync="muteSegments">
<div class="switch-container">
<label class="switch">
<input id="muteSegments" type="checkbox" checked>
<span class="slider round"></span>
</label>
<label class="switch-label" for="muteSegments">
__MSG_muteSegments__
</label>
</div>
</div>
<div data-type="toggle" data-sync="fullVideoSegments">
<div class="switch-container">
<label class="switch">
<input id="fullVideoSegments" type="checkbox" checked>
<span class="slider round"></span>
</label>
<label class="switch-label" for="fullVideoSegments">
__MSG_fullVideoSegments__
</label>
</div>
</div> </div>
<div data-type="react-AdvancedSkipOptionsComponent" class="hide-when-skip-profile"></div> <div data-type="number-change" data-sync="minDuration">
<label class="number-container">
<span class="optionLabel">__MSG_minDuration__</span>
<input type="number" step="0.1" min="0">
</label>
<div class="small-description">__MSG_minDurationDescription__</div>
</div>
<div data-type="toggle" data-sync="forceChannelCheck" class="hide-when-skip-profile"> <div data-type="toggle" data-sync="forceChannelCheck">
<div class="switch-container"> <div class="switch-container">
<label class="switch"> <label class="switch">
<input id="forceChannelCheck" type="checkbox" checked> <input id="forceChannelCheck" type="checkbox" checked>
@@ -96,32 +125,18 @@
<div class="small-description">__MSG_whatForceChannelCheck__</div> <div class="small-description">__MSG_whatForceChannelCheck__</div>
</div> </div>
<div data-type="toggle" data-sync="showCategoryWithoutPermission" class="hide-when-skip-profile"> <div data-type="toggle" data-sync="refetchWhenNotFound">
<div class="switch-container"> <div class="switch-container">
<label class="switch"> <label class="switch">
<input id="showCategoryWithoutPermission" type="checkbox" checked> <input id="refetchWhenNotFound" type="checkbox" checked>
<span class="slider round"></span> <span class="slider round"></span>
</label> </label>
<label class="switch-label" for="showCategoryWithoutPermission"> <label class="switch-label" for="refetchWhenNotFound">
__MSG_enableShowCategoryWithoutPermission__ __MSG_enableRefetchWhenNotFound__
</label> </label>
</div> </div>
<div class="small-description">__MSG_whatShowCategoryWithoutPermission__</div> <div class="small-description">__MSG_whatRefetchWhenNotFound__</div>
</div>
<div id="ytNeuterPromotion" class="promotion-container">
<a class="dearrow-link"
href="https://github.com/mchangrh/yt-neuter/blob/main/docs/filters/sponsorblock.md#install"
target="_blank"
rel="noreferrer">
<span class="promotion-description">
__MSG_YtNeuterMessage__
</span>
</a>
<div class="small-description">__MSG_requiresUblock__</div>
</div> </div>
</div> </div>
@@ -137,58 +152,28 @@
<div class="small-description">__MSG_skipNoticeDurationDescription__</div> <div class="small-description">__MSG_skipNoticeDurationDescription__</div>
</div> </div>
<div> <div data-type="toggle" data-toggle-type="reverse" data-sync="dontShowNotice">
<div data-type="toggle" data-sync="showUpcomingNotice"> <div class="switch-container">
<div class="switch-container"> <label class="switch">
<label class="switch"> <input id="dontShowNotice" type="checkbox" checked>
<input id="showUpcomingNotice" type="checkbox" checked> <span class="slider round"></span>
<span class="slider round"></span> </label>
</label> <label class="switch-label" for="dontShowNotice">
<label class="switch-label" for="showUpcomingNotice"> __MSG_showSkipNotice__
__MSG_showUpcomingNotice__ </label>
</label>
</div>
</div>
<br/>
<div data-type="toggle" data-toggle-type="reverse" data-sync="dontShowNotice">
<div class="switch-container">
<label class="switch">
<input id="dontShowNotice" type="checkbox" checked>
<span class="slider round"></span>
</label>
<label class="switch-label" for="dontShowNotice">
__MSG_showSkipNotice__
</label>
</div>
</div>
<div data-type="selector" data-sync="noticeVisibilityMode" data-dependent-on="dontShowNotice">
<br/>
<label class="optionLabel" for="noticeVisibilityMode">__MSG_noticeVisibilityLabel__:</label>
<select id="noticeVisibilityMode" class="selector-element optionsSelector" >
<option value="0">__MSG_noticeVisibilityMode0__</option>
<option value="1">__MSG_noticeVisibilityMode1__</option>
<option value="2">__MSG_noticeVisibilityMode2__</option>
<option value="3">__MSG_noticeVisibilityMode3__</option>
<option value="4">__MSG_noticeVisibilityMode4__</option>
</select>
</div> </div>
</div> </div>
<div data-type="toggle" data-sync="showCategoryGuidelines"> <div data-type="selector" data-sync="noticeVisibilityMode">
<div class="switch-container"> <label class="optionLabel" for="noticeVisibilityMode">__MSG_noticeVisibilityLabel__:</label>
<label class="switch">
<input id="showCategoryGuidelines" type="checkbox" checked> <select id="noticeVisibilityMode" class="selector-element optionsSelector" >
<span class="slider round"></span> <option value="0">__MSG_noticeVisibilityMode0__</option>
</label> <option value="1">__MSG_noticeVisibilityMode1__</option>
<label class="switch-label" for="showCategoryGuidelines"> <option value="2">__MSG_noticeVisibilityMode2__</option>
__MSG_showCategoryGuidelines__ <option value="3">__MSG_noticeVisibilityMode3__</option>
</label> <option value="4">__MSG_noticeVisibilityMode4__</option>
</div> </select>
</div> </div>
<div data-type="toggle" data-toggle-type="reverse" data-sync="hideVideoPlayerControls"> <div data-type="toggle" data-toggle-type="reverse" data-sync="hideVideoPlayerControls">
@@ -264,18 +249,6 @@
</label> </label>
</div> </div>
</div> </div>
<div data-type="toggle" data-sync="allowScrollingToEdit">
<div class="switch-container">
<label class="switch">
<input id="allowScrollingToEdit" type="checkbox" checked>
<span class="slider round"></span>
</label>
<label class="switch-label" for="allowScrollingToEdit">
__MSG_allowScrollingToEdit__
</label>
</div>
</div>
<div data-type="toggle" data-sync="audioNotificationOnSkip"> <div data-type="toggle" data-sync="audioNotificationOnSkip">
<div class="switch-container"> <div class="switch-container">
@@ -305,45 +278,6 @@
<div class="small-description">__MSG_showTimeWithSkipsDescription__</div> <div class="small-description">__MSG_showTimeWithSkipsDescription__</div>
</div> </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>
<br/>
<div data-type="toggle" data-sync="hideSegmentCreationInPopup">
<div class="switch-container">
<label class="switch">
<input id="hideSegmentCreationInPopup" type="checkbox" checked>
<span class="slider round"></span>
</label>
<label class="switch-label" for="hideSegmentCreationInPopup">
__MSG_hideSegmentCreationInPopup__
</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"> <div data-type="toggle" data-sync="darkMode">
<div class="switch-container"> <div class="switch-container">
<label class="switch"> <label class="switch">
@@ -356,30 +290,6 @@
</div> </div>
</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">
<input id="showNewFeaturePopups" type="checkbox" checked>
<span class="slider round"></span>
</label>
<label class="switch-label" for="showNewFeaturePopups">
__MSG_hideNewFeatureUpdates__
</label>
</div>
</div>
<div data-type="toggle" data-toggle-type="reverse" data-sync="showDonationLink" data-no-safari="true"> <div data-type="toggle" data-toggle-type="reverse" data-sync="showDonationLink" data-no-safari="true">
<div class="switch-container"> <div class="switch-container">
<label class="switch"> <label class="switch">
@@ -392,18 +302,6 @@
</div> </div>
</div> </div>
<div data-type="toggle" data-toggle-type="reverse" data-sync="showUpsells" data-no-safari="true">
<div class="switch-container">
<label class="switch">
<input id="showUpsell" type="checkbox" checked>
<span class="slider round"></span>
</label>
<label class="switch-label" for="showUpsells">
__MSG_hideUpsells__
</label>
</div>
</div>
</div> </div>
<div id="keybinds" class="option-group hidden"> <div id="keybinds" class="option-group hidden">
@@ -413,56 +311,16 @@
<div class="inline"></div> <div class="inline"></div>
</div> </div>
<div data-type="keybind-change" data-sync="skipToHighlightKeybind">
<label class="optionLabel">__MSG_skip_to_category__:</label>
<div class="inline"></div>
</div>
<div data-type="keybind-change" data-sync="closeSkipNoticeKeybind">
<label class="optionLabel">__MSG_setCloseSkipNoticeKeybind__:</label>
<div class="inline"></div>
</div>
<div data-type="keybind-change" data-sync="startSponsorKeybind"> <div data-type="keybind-change" data-sync="startSponsorKeybind">
<label class="optionLabel">__MSG_setStartSponsorShortcut__:</label> <label class="optionLabel">__MSG_setStartSponsorShortcut__:</label>
<div class="inline"></div> <div class="inline"></div>
</div> </div>
<div data-type="keybind-change" data-sync="submitKeybind"> <div data-type="keybind-change" data-sync="submitKeybind">
<label class="optionLabel">__MSG_setOpenSubmissionMenuKeybind__:</label>
<div class="inline"></div>
</div>
<div data-type="keybind-change" data-sync="previewKeybind">
<label class="optionLabel">__MSG_setPreviewKeybind__:</label>
<div class="inline"></div>
</div>
<div data-type="keybind-change" data-sync="actuallySubmitKeybind">
<label class="optionLabel">__MSG_setSubmitKeybind__:</label> <label class="optionLabel">__MSG_setSubmitKeybind__:</label>
<div class="inline"></div> <div class="inline"></div>
</div> </div>
<div data-type="keybind-change" data-sync="nextChapterKeybind">
<label class="optionLabel">__MSG_nextChapterKeybind__:</label>
<div class="inline"></div>
</div>
<div data-type="keybind-change" data-sync="previousChapterKeybind">
<label class="optionLabel">__MSG_previousChapterKeybind__:</label>
<div class="inline"></div>
</div>
<div data-type="keybind-change" data-sync="upvoteKeybind">
<label class="optionLabel">__MSG_setUpvoteKeybind__:</label>
<div class="inline"></div>
</div>
<div data-type="keybind-change" data-sync="downvoteKeybind">
<label class="optionLabel">__MSG_setDownvoteKeybind__:</label>
<div class="inline"></div>
</div>
</div> </div>
<div id="import" class="option-group hidden"> <div id="import" class="option-group hidden">
@@ -482,8 +340,6 @@
</div> </div>
</div> </div>
</div> </div>
<div data-type="react-UnsubmittedVideosComponent"></div>
<div data-type="private-text-change" data-sync="*" data-confirm-message="exportOptionsWarning"> <div data-type="private-text-change" data-sync="*" data-confirm-message="exportOptionsWarning">
<h2>__MSG_exportOptions__</h2> <h2>__MSG_exportOptions__</h2>
@@ -512,37 +368,6 @@
</div> </div>
</div> </div>
<div data-type="private-text-change" data-sync-type="local" data-sync="*" data-confirm-message="exportOptionsWarning">
<h2>__MSG_exportOtherData__</h2>
<div>
<div class="option-button trigger-button inline">
__MSG_exportOptionsCopy__
</div>
<div class="option-button download-button inline">
__MSG_exportOptionsDownload__
</div>
<label for="importLocalOptions" class="option-button inline">
__MSG_exportOptionsUpload__
</label>
<input id="importLocalOptions" type="file" class="upload-button hidden" />
</div>
<div class="option-hidden-section hidden spacing indent">
<textarea class="option-text-box" rows="10" style="width:80%"></textarea>
<div class="option-button text-change-set">
__MSG_setOptions__
</div>
</div>
</div>
<div data-type="button-press" data-sync="resetToDefault" data-confirm-message="confirmResetToDefault">
<div class="option-button trigger-button">
__MSG_resetToDefault__
</div>
</div>
</div> </div>
<div id="advanced" class="option-group hidden"> <div id="advanced" class="option-group hidden">
@@ -558,11 +383,11 @@
</label> </label>
</div> </div>
<div class="small-description">(__MSG_supportedSites__ Invidious, CloudTube, Piped, YouTube Kids)</div> <div class="small-description">(__MSG_supportedSites__ Invidious, CloudTube)</div>
<div class="small-description">__MSG_supportOtherSitesDescription__ </div> <div class="small-description">__MSG_supportOtherSitesDescription__ </div>
</div> </div>
<div data-type="private-text-change" data-sync="invidiousInstances" data-dependent-on="supportInvidious" data-no-safari="true"> <div data-type="private-text-change" data-sync="invidiousInstances" data-no-safari="true" data-dependent-on="supportInvidious">
<div class="option-button trigger-button"> <div class="option-button trigger-button">
__MSG_addInvidiousInstance__ __MSG_addInvidiousInstance__
</div> </div>
@@ -629,19 +454,7 @@
<div class="small-description">__MSG_whatTrackDownvotes__</div> <div class="small-description">__MSG_whatTrackDownvotes__</div>
</div> </div>
<div data-type="toggle" data-sync="trackDownvotesInPrivate" data-confirm-on="false">
<div class="switch-container">
<label class="switch">
<input id="trackDownvotesInPrivate" type="checkbox" checked>
<span class="slider round"></span>
</label>
<label class="switch-label" for="trackDownvotesInPrivate">
__MSG_enableTrackDownvotesInPrivate__
</label>
</div>
</div>
<div data-type="button-press" data-sync="copyDebugInformation" data-confirm-message="copyDebugInformation"> <div data-type="button-press" data-sync="copyDebugInformation" data-confirm-message="copyDebugInformation">
<div class="option-button trigger-button"> <div class="option-button trigger-button">
__MSG_copyDebugInformation__ __MSG_copyDebugInformation__
@@ -649,7 +462,7 @@
<div class="small-description">__MSG_copyDebugInformationOptions__</div> <div class="small-description">__MSG_copyDebugInformationOptions__</div>
</div> </div>
<div data-type="toggle" data-sync="testingServer" data-confirm-message="testingServerWarning" data-no-safari="true"> <div data-type="toggle" data-sync="testingServer" data-confirm-message="testingServerWarning" data-no-safari="true">
<div class="switch-container"> <div class="switch-container">
<label class="switch"> <label class="switch">

View File

@@ -1,33 +1,3 @@
content-scripts-register-polyfill
4.0.2 <https://github.com/fregante/content-scripts-register-polyfill>
MIT License
Copyright (c) Federico Brigante <me@fregante.com> (https://fregante.com)
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
******************************
escape-string-regexp
5.0.0 <https://github.com/sindresorhus/escape-string-regexp>
MIT License
Copyright (c) Sindre Sorhus <sindresorhus@gmail.com> (https://sindresorhus.com)
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
******************************
js-tokens js-tokens
4.0.0 <https://github.com/lydell/js-tokens> 4.0.0 <https://github.com/lydell/js-tokens>
The MIT License (MIT) The MIT License (MIT)
@@ -80,10 +50,37 @@ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
THE SOFTWARE. THE SOFTWARE.
******************************
object-assign
4.1.1 <https://github.com/sindresorhus/object-assign>
The MIT License (MIT)
Copyright (c) Sindre Sorhus <sindresorhus@gmail.com> (sindresorhus.com)
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in
all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
THE SOFTWARE.
****************************** ******************************
react react
18.2.0 <https://github.com/facebook/react> 17.0.2 <https://github.com/facebook/react>
MIT License MIT License
Copyright (c) Facebook, Inc. and its affiliates. Copyright (c) Facebook, Inc. and its affiliates.
@@ -110,7 +107,7 @@ SOFTWARE.
****************************** ******************************
react-dom react-dom
18.2.0 <https://github.com/facebook/react> 17.0.2 <https://github.com/facebook/react>
MIT License MIT License
Copyright (c) Facebook, Inc. and its affiliates. Copyright (c) Facebook, Inc. and its affiliates.
@@ -137,7 +134,7 @@ SOFTWARE.
****************************** ******************************
scheduler scheduler
0.23.0 <https://github.com/facebook/react> 0.20.2 <https://github.com/facebook/react>
MIT License MIT License
Copyright (c) Facebook, Inc. and its affiliates. Copyright (c) Facebook, Inc. and its affiliates.
@@ -159,48 +156,3 @@ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE. SOFTWARE.
******************************
webext-content-scripts
2.5.5 <https://github.com/fregante/webext-content-scripts>
MIT License
Copyright (c) Federico Brigante <me@fregante.com> (https://fregante.com)
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
******************************
webext-patterns
1.3.0 <https://github.com/fregante/webext-patterns>
MIT License
Copyright (c) Federico Brigante <me@fregante.com> (https://fregante.com)
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
******************************
webext-polyfill-kinda
1.0.2 <https://github.com/fregante/webext-polyfill-kinda>
MIT License
Copyright (c) Federico Brigante <me@fregante.com> (https://fregante.com)
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

View File

@@ -6,6 +6,7 @@
<link href="styles.css" rel="stylesheet"/> <link href="styles.css" rel="stylesheet"/>
<script src="../js/vendor.js"></script>
<script src="../js/permissions.js"></script> <script src="../js/permissions.js"></script>
</head> </head>
@@ -18,12 +19,6 @@
<br/> <br/>
<div class="center">
__MSG_invidiousPermissionRefresh__
</div>
<br/>
<div class="center"> <div class="center">
<div id="acceptPermissionButton" class="option-button inline"> <div id="acceptPermissionButton" class="option-button inline">
__MSG_acceptPermission__ __MSG_acceptPermission__

View File

@@ -19,7 +19,7 @@ body {
font-weight: bold; font-weight: bold;
} }
.hidden, .sbhidden { .hidden {
display: none !important; display: none !important;
} }

File diff suppressed because it is too large Load Diff

View File

@@ -1,13 +1,160 @@
<!DOCTYPE html>
<html id="sponsorBlockPopupHTML"> <html id="sponsorBlockPopupHTML">
<head> <head>
<meta name="viewport" content="width=device-width, initial-scale=1" /> <meta charset="utf-8" />
<title>__MSG_openPopup__</title>
<meta name="viewport" content="width=device-width, initial-scale=1" />
<link id="sponsorBlockPopupFont" href="/libs/Source+Sans+Pro.css" rel="stylesheet">
<link id="sponsorBlockStyleSheet" href="popup.css" rel="stylesheet">
</head>
<link href="popup.css" rel="stylesheet"> <body id="sponsorBlockPopupBody">
<link href="shared.css" rel="stylesheet"> <div id="sponsorblockPopup" class="sponsorBlockPageBody sb-preload">
<script src="./js/popup.js"></script>
</head>
<body id="sponsorBlockPopupBody"> <header class="sbPopupLogo">
<img src="icons/IconSponsorBlocker256px.png" alt="SponsorBlock" width="40" height="40" id="sponsorBlockPopupLogo">
<p class="u-mZ">SponsorLock</p>
</header>
</body> <div id="videoInfo">
</html> <!-- Loading text -->
<p id="loadingIndicator" class="u-mZ">__MSG_noVideoID__</p>
<!-- If the video was found in the database -->
<p id="videoFound" class="u-mZ"></p>
<button id="refreshSegmentsButton" title="__MSG_refreshSegments__">
<img src="/icons/refresh.svg" alt="Refresh icon" id="refreshSegments" />
</button>
<div id="issueReporterContainer">
<div id="issueReporterTimeButtons"></div>
</div>
</div>
<div class="sbControlsMenu">
<label style="display: none" id="whitelistButton" for="whitelistToggle" class="hidden sbControlsMenu-item" title="__MSG_forceChannelCheckPopup__">
<input type="checkbox" style="display:none;" id="whitelistToggle">
<svg viewBox="0 0 24 24" width="23" height="23" class="SBWhitelistIcon sbControlsMenu-itemIcon">
<path d="M24 10H14V0h-4v10H0v4h10v10h4V14h10z" />
</svg>
<span id="whitelistChannel">__MSG_whitelistChannel__</span>
<span id="unwhitelistChannel" style="display: none">__MSG_removeFromWhitelist__</span>
</label>
<!--github: mbledkowski/toggle-switch-->
<label id="disableExtension" for="toggleSwitch" class="toggleSwitchContainer sbControlsMenu-item">
<span class="toggleSwitchContainer-switch">
<input type="checkbox" style="display:none;" id="toggleSwitch" checked>
<span class="switchBg shadow"></span>
<span class="switchBg white"></span>
<span class="switchBg green"></span>
<span class="switchDot"></span>
</span>
<span id="disableSkipping">__MSG_disableSkipping__</span>
<span id="enableSkipping" style="display: none">__MSG_enableSkipping__</span>
</label>
<button id="optionsButton" class="sbControlsMenu-item" title="__MSG_optionsInfo__">
<img src="/icons/settings.svg" alt="Settings icon" width="23" height="23" class="sbControlsMenu-itemIcon" id="sbPopupIconSettings" />
__MSG_Options__
</button>
</div>
<p id="whitelistForceCheck" class="u-mZ hidden">
__MSG_forceChannelCheckPopup__
</p>
<div id="mainControls" style="display: none">
<p class="sbHeader">
__MSG_recordTimesDescription__
</p>
<sub style="margin-bottom: 12px;">__MSG_popupHint__</sub>
<div>
<button id="sponsorStart" class="sbMediumButton">__MSG_sponsorStart__</button>
</div>
<div id="submissionSection" style="display: none">
<b style="display: block; margin-top: 12px;">__MSG_submissionEditHint__</b>
<button id="submitTimes" class="sbMediumButton">__MSG_submitTimesButton__</button>
</div>
</div>
<h1 class="recordingSubtitle sbHeader" style="display: none">__MSG_yourWork__</h1>
<div class="sbYourWorkCols" style="display: none">
<div id="usernameElement">
<div>
<p class="u-mZ">__MSG_Username__:</p>
<div id="setUsernameContainer">
<p id="usernameValue" class="u-mZ"></p>
<button id="setUsernameButton" title="__MSG_setUsername__">
<img src="/icons/pencil.svg" alt="__MSG_setUsername__" width="16" height="16" id="sbPopupIconEdit">
</button>
<button id="copyUserID" title="__MSG_copyPublicID__">
<img src="/icons/clipboard.svg" alt="__MSG_copyPublicID__" width="16" height="16" id="sbPopupIconCopyUserID">
</button>
</div>
<div id="setUsername" style="display: none">
<div id="setUsernameStatusContainer" style="display: none">
<p id="setUsernameStatus" class="u-mZ"></p>
</div>
<input id="usernameInput" placeholder="Username">
<button id="submitUsername">
<img src="/icons/check.svg" alt="__MSG_setUsername__" width="16" height="16" id="sbPopupIconCheck">
</button>
</div>
</div>
</div>
<div id="sponsorTimesContributionsContainer" class="hidden">
<div>
<p class="u-mZ">__MSG_Submissions__:</p>
<span id="sponsorTimesContributionsDisplay">
0
</span>
</div>
</div>
</div>
<p id="sponsorTimesViewsContainer" style="display: none" class="u-mZ">
__MSG_savedPeopleFrom__
<b><span id="sponsorTimesViewsDisplay">
0
</span></b>
<span id="sponsorTimesViewsDisplayEndWord">__MSG_Segments__</span>
<br>
(<b><span id="sponsorTimesOthersTimeSavedDisplay">0</span>
<span id="sponsorTimesOthersTimeSavedEndWord">__MSG_minsLower__</span></b>
<span>__MSG_youHaveSavedTimeEnd__</span>).
</p>
<p id="sponsorTimesSkipsDoneContainer" style="display: none" class="u-mZ">
__MSG_youHaveSkipped__
<b><span id="sponsorTimesSkipsDoneDisplay">
0
</span></b>
<span id="sponsorTimesSkipsDoneEndWord">__MSG_Segments__</span>
(<b><span id="sponsorTimeSavedDisplay">
0
</span>
<span id="sponsorTimeSavedEndWord">__MSG_minsLower__</span></b>).
</p>
<footer id="sbFooter" style="display: none">
<div id="sponsorTimesDonateContainer" style="display: none; align-items: center; justify-content: center;">
<img class="sbHeart" src="/icons/heart.svg" alt="Heart icon" />
<a id="sbConsiderDonateLink" href="https://sponsor.ajay.app/donate" target="_blank" rel="noopener">
__MSG_considerDonating__
</a>
<img id="sbCloseDonate" src="/icons/close.png" alt="Close icon" height="8" style="padding-left: 5px; cursor: pointer;" />
</div>
<a href="https://sponsor.ajay.app" target="_blank" rel="noopener">__MSG_website__</a> |
<a href="https://sponsor.ajay.app/stats" target="_blank" rel="noopener">__MSG_viewLeaderboard__</a> |
<a href="https://github.com/ajayyy/SponsorBlock" target="_blank" rel="noopener">GitHub</a>
<br/>
<a href="https://discord.gg/SponsorBlock" target="_blank" rel="noopener">Discord</a> |
<a href="https://matrix.to/#/#sponsor:ajay.app?via=ajay.app&via=matrix.org&via=mozilla.org" target="_blank" rel="noopener">Matrix</a> |
<a id="helpButton">__MSG_help__</a>
</footer>
<button id="showNoticeAgain" style="display: none">__MSG_showNotice__</button>
</div>
<!-- Scripts that need to load after the html -->
<script src="./js/vendor.js" async></script>
<script src="./js/popup.js" async></script>
</body>
</html>

View File

@@ -1 +0,0 @@
{"Albania":{"allowed":true},"Algeria":{"allowed":true},"Angola":{"allowed":true},"Argentina":{"allowed":true},"Armenia":{"allowed":true},"Australia":{"allowed":false},"Austria":{"allowed":false},"Azerbaijan":{"allowed":true},"Bangladesh":{"allowed":true},"Belarus":{"allowed":true},"Belgium":{"allowed":false},"Belize":{"allowed":true},"Benin":{"allowed":true},"Bhutan":{"allowed":true},"Bolivia":{"allowed":true},"Bosnia and Herzegovina":{"allowed":true},"Botswana":{"allowed":true},"Brazil":{"allowed":true},"Bulgaria":{"allowed":true},"Burkina Faso":{"allowed":true},"Burundi":{"allowed":true},"Cameroon":{"allowed":true},"Canada":{"allowed":false},"Central African Republic":{"allowed":true},"Chad":{"allowed":true},"Chile":{"allowed":true},"China":{"allowed":true},"Colombia":{"allowed":true},"Comoros":{"allowed":true},"Costa Rica":{"allowed":true},"Croatia":{"allowed":true},"Cyprus":{"allowed":false},"Czech Republic":{"allowed":false},"Denmark":{"allowed":false},"Djibouti":{"allowed":true},"Dominican Republic":{"allowed":true},"DR Congo":{"allowed":true},"Ecuador":{"allowed":true},"Egypt":{"allowed":true},"El Salvador":{"allowed":true},"Estonia":{"allowed":false},"Eswatini":{"allowed":true},"Ethiopia":{"allowed":true},"Fiji":{"allowed":true},"Finland":{"allowed":false},"France":{"allowed":false},"Gabon":{"allowed":true},"Gambia":{"allowed":true},"Georgia":{"allowed":true},"Germany":{"allowed":false},"Ghana":{"allowed":true},"Greece":{"allowed":true},"Guatemala":{"allowed":true},"Guinea":{"allowed":true},"Guinea-Bissau":{"allowed":true},"Guyana":{"allowed":true},"Haiti":{"allowed":true},"Honduras":{"allowed":true},"Hungary":{"allowed":true},"Iceland":{"allowed":false},"India":{"allowed":true},"Iran":{"allowed":true},"Iraq":{"allowed":true},"Ireland":{"allowed":false},"Israel":{"allowed":false},"Italy":{"allowed":false},"Ivory Coast":{"allowed":true},"Jamaica":{"allowed":true},"Japan":{"allowed":false},"Jordan":{"allowed":true},"Kazakhstan":{"allowed":true},"Kenya":{"allowed":true},"Kiribati":{"allowed":true},"Kyrgyzstan":{"allowed":true},"Laos":{"allowed":true},"Latvia":{"allowed":true},"Lebanon":{"allowed":true},"Lesotho":{"allowed":true},"Liberia":{"allowed":true},"Lithuania":{"allowed":true},"Luxembourg":{"allowed":false},"Madagascar":{"allowed":true},"Malawi":{"allowed":true},"Malaysia":{"allowed":true},"Maldives":{"allowed":true},"Mali":{"allowed":true},"Malta":{"allowed":false},"Mauritania":{"allowed":true},"Mauritius":{"allowed":true},"Mexico":{"allowed":true},"Micronesia":{"allowed":true},"Moldova":{"allowed":true},"Mongolia":{"allowed":true},"Montenegro":{"allowed":true},"Morocco":{"allowed":true},"Mozambique":{"allowed":true},"Myanmar":{"allowed":true},"Namibia":{"allowed":true},"Nepal":{"allowed":true},"Netherlands":{"allowed":false},"Nicaragua":{"allowed":true},"Niger":{"allowed":true},"Nigeria":{"allowed":true},"North Macedonia":{"allowed":true},"Norway":{"allowed":false},"Pakistan":{"allowed":true},"Panama":{"allowed":true},"Papua New Guinea":{"allowed":true},"Paraguay":{"allowed":true},"Peru":{"allowed":true},"Philippines":{"allowed":true},"Poland":{"allowed":true},"Portugal":{"allowed":true},"Republic of the Congo":{"allowed":true},"Romania":{"allowed":true},"Russia":{"allowed":true},"Rwanda":{"allowed":true},"Saint Lucia":{"allowed":true},"Samoa":{"allowed":true},"Sao Tome and Principe":{"allowed":true},"Senegal":{"allowed":true},"Serbia":{"allowed":true},"Seychelles":{"allowed":true},"Sierra Leone":{"allowed":true},"Slovakia":{"allowed":true},"Slovenia":{"allowed":false},"Solomon Islands":{"allowed":true},"South Africa":{"allowed":true},"South Korea":{"allowed":false},"South Sudan":{"allowed":true},"Spain":{"allowed":false},"Sri Lanka":{"allowed":true},"Sudan":{"allowed":true},"Suriname":{"allowed":true},"Sweden":{"allowed":false},"Switzerland":{"allowed":false},"Syria":{"allowed":true},"Taiwan":{"allowed":false},"Tajikistan":{"allowed":true},"Tanzania":{"allowed":true},"Thailand":{"allowed":true},"Timor-Leste":{"allowed":true},"Togo":{"allowed":true},"Tonga":{"allowed":true},"Trinidad and Tobago":{"allowed":true},"Tunisia":{"allowed":true},"Turkey":{"allowed":true},"Turkmenistan":{"allowed":true},"Tuvalu":{"allowed":true},"Uganda":{"allowed":true},"Ukraine":{"allowed":true},"United Arab Emirates":{"allowed":false},"United Kingdom":{"allowed":false},"United States":{"allowed":false},"Uruguay":{"allowed":true},"Uzbekistan":{"allowed":true},"Vanuatu":{"allowed":true},"Venezuela":{"allowed":true},"Vietnam":{"allowed":true},"Yemen":{"allowed":true},"Zambia":{"allowed":true},"Zimbabwe":{"allowed":true}}

View File

@@ -1,237 +0,0 @@
.sponsorSkipNoticeParent {
position: absolute;
bottom: 100px;
right: var(--skip-notice-right);
}
.sponsorSkipNoticeParent, .sponsorSkipNotice {
border-spacing: var(--skip-notice-border-horizontal) var(--skip-notice-border-vertical);
padding-left: var(--skip-notice-padding);
padding-right: var(--skip-notice-padding);
border-collapse: unset;
}
.sponsorSkipNoticeParent {
min-width: 390px;
max-width: 50%;
}
.sponsorSkipNotice {
width: 100%;
}
.sponsorSkipNoticeTableContainer {
background-color: rgba(28, 28, 28, 0.9);
border-radius: 5px;
min-width: 100%;
}
.sponsorSkipNoticeTableContainer.prideTheme {
background: url("icons/pride.svg");
background-size: cover;
}
.sponsorSkipNotice {
transition: all 0.1s ease-out;
}
.sponsorSkipNoticeLimitWidth {
max-width: calc(100% - 50px);
}
.sponsorSkipNotice .sbhidden {
display: none;
}
/* For Cloudtube */
.sponsorSkipNotice td, .sponsorSkipNotice table, .sponsorSkipNotice th {
border: none;
}
.sponsorSkipNoticeFadeIn {
animation: fadeIn 0.5s ease-out;
}
.sponsorSkipNoticeFaded {
opacity: 0.5;
}
.sponsorSkipNoticeFadeOut {
transition: opacity 3s cubic-bezier(0.55, 0.055, 0.675, 0.19);
opacity: 0 !important;
animation: none !important;
}
.sponsorSkipNotice .sponsorSkipNoticeTimeLeft {
color: #eeeeee;
border-radius: 4px;
padding: 2px 5px;
font-size: 12px;
display: flex;
align-items: center;
border: 1px solid #eeeeee;
}
.sponsorSkipNoticeTimeLeft img {
vertical-align: middle;
height: 13px;
padding-top: 7.8%;
padding-bottom: 7.8%;
}
/* if two are very close to eachother */
.secondSkipNotice {
bottom: 290px;
}
.noticeLeftIcon {
display: flex;
align-items: center;
}
.sponsorSkipNotice .sponsorSkipNoticeUnskipSection {
float: left;
border-left: 1px solid rgb(150, 150, 150);
}
.sponsorSkipNoticeButton {
background: none;
color: rgb(235, 235, 235);
border: none;
display: inline-block;
font-size: 13.3333px !important;
cursor: pointer;
margin-right: 10px;
padding: 2px 5px;
}
.sponsorSkipNoticeButton:hover {
background-color: rgba(235, 235, 235,0.2);
border-radius: 4px;
transition: background-color 0.4s;
}
.sponsorSkipNoticeFirstRow .sponsorSkipNoticeButton.sponsorSkipSmallButton {
height: 1.3em;
padding: 0;
}
.sponsorTimesVoteButtonsContainer {
float: left;
vertical-align:middle;
padding: 2px 5px;
margin-right: 4px;
}
.sponsorTimesVoteButtonsContainer div{
display: inline-block;
}
.sponsorSkipNoticeRightSection {
right: 0;
position: absolute;
float: right;
margin-right: 10px;
display: flex;
align-items: center;
}
.sponsorSkipNoticeRightButton {
margin-right: 0;
}
.sponsorSkipNoticeCloseButton {
height: 10px;
width: 10px;
box-sizing: unset;
padding: 2px 5px;
margin-left: 2px;
float: right;
}
.sponsorSkipNoticeCloseButton.biggerCloseButton {
padding: 20px;
}
.sponsorSkipMessage {
font-size: 14px;
font-weight: bold;
color: rgb(235, 235, 235);
margin-top: auto;
display: inline-block;
margin-right: 10px;
margin-bottom: auto;
}
.sponsorSkipInfo {
font-size: 10px;
color: #000000;
text-align: center;
margin-top: 0px;
}
#sponsorTimesThanksForVotingText {
font-size: 20px;
font-weight: bold;
color: #000000;
text-align: center;
margin-top: 0px;
margin-bottom: 0px;
}
#sponsorTimesThanksForVotingInfoText {
font-size: 12px;
font-weight: bold;
color: #000000;
text-align: center;
margin-top: 0px;
}
.sponsorTimesVoteButtonMessage {
float: left;
}
.sponsorTimesInfoMessage {
font-size: 13.3333px;
color: rgb(235, 235, 235);
}
.sb-guidelines-notice .sponsorTimesInfoMessage td {
padding-left: 5px;
padding-top: 2px;
padding-bottom: 2px;
font-size: 15px;
display: flex;
align-items: center;
}
/*
* Buttons that appear under a segment on click
*/
.voteButton {
height: 20px;
padding: 0 5px;
cursor: pointer;
}
.voteButton:hover {
opacity: 0.8;
}

View File

@@ -2,255 +2,184 @@ import * as CompileConfig from "../config.json";
import Config from "./config"; import Config from "./config";
import { Registration } from "./types"; import { Registration } from "./types";
import "content-scripts-register-polyfill";
import { sendRealRequestToCustomServer, serializeOrStringify, setupBackgroundRequestProxy } from "../maze-utils/src/background-request-proxy"; // Make the config public for debugging purposes
import { setupTabUpdates } from "../maze-utils/src/tab-updates";
import { generateUserID } from "../maze-utils/src/setup"; window.SB = Config;
import Utils from "./utils"; import Utils from "./utils";
import { getExtensionIdsToImportFrom } from "./utils/crossExtension";
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({ const utils = new Utils({
registerFirefoxContentScript, registerFirefoxContentScript,
unregisterFirefoxContentScript unregisterFirefoxContentScript
}); });
const popupPort: Record<string, chrome.runtime.Port> = {};
// Used only on Firefox, which does not support non persistent background pages. // Used only on Firefox, which does not support non persistent background pages.
const contentScriptRegistrations = {}; const contentScriptRegistrations = {};
// Register content script if needed // Register content script if needed
utils.wait(() => Config.isReady()).then(function() { if (utils.isFirefox()) {
if (Config.config.supportInvidious) utils.setupExtraSiteContentScripts(); utils.wait(() => Config.config !== null).then(function() {
}); if (Config.config.supportInvidious) utils.setupExtraSiteContentScripts();
});
}
setupBackgroundRequestProxy(); chrome.tabs.onUpdated.addListener(function(tabId) {
setupTabUpdates(Config); chrome.tabs.sendMessage(tabId, {
message: 'update',
}, () => void chrome.runtime.lastError ); // Suppress error on Firefox
});
chrome.runtime.onMessage.addListener(function (request, sender, callback) { chrome.runtime.onMessage.addListener(function (request, sender, callback) {
switch(request.message) { switch(request.message) {
case "openConfig": case "openConfig":
chrome.tabs.create({url: chrome.runtime.getURL('options/options.html' + (request.hash ? '#' + request.hash : ''))}); chrome.tabs.create({url: chrome.runtime.getURL('options/lock-options.html' + (request.hash ? '#' + request.hash : ''))});
return false; return;
case "openHelp": case "openHelp":
chrome.tabs.create({url: chrome.runtime.getURL('help/index.html')}); chrome.tabs.create({url: chrome.runtime.getURL('help/index.html')});
return false; return;
case "openPage": case "openPage":
chrome.tabs.create({url: chrome.runtime.getURL(request.url)}); chrome.tabs.create({url: chrome.runtime.getURL(request.url)});
return false; return;
case "sendRequest":
sendRequestToCustomServer(request.type, request.url, request.data).then(async (response) => {
callback({
responseText: await response.text(),
status: response.status,
ok: response.ok
});
});
return true;
case "submitVote": case "submitVote":
submitVote(request.type, request.UUID, request.category, request.videoID).then(callback); submitVote(request.type, request.UUID, request.category).then(callback);
//this allows the callback to be called later //this allows the callback to be called later
return true; return true;
case "registerContentScript": case "registerContentScript":
registerFirefoxContentScript(request); registerFirefoxContentScript(request);
return false; return false;
case "unregisterContentScript": case "unregisterContentScript":
unregisterFirefoxContentScript(request.id) unregisterFirefoxContentScript(request.id)
return false; return false;
case "tabs": {
chrome.tabs.query({
active: true,
currentWindow: true
}, tabs => {
chrome.tabs.sendMessage(
tabs[0].id,
request.data,
(response) => {
callback(response);
}
);
});
return true;
}
case "time":
case "infoUpdated":
case "videoChanged":
if (sender.tab) {
try {
popupPort[sender.tab.id]?.postMessage(request);
} catch (e) {
// This can happen if the popup is closed
}
}
return false;
default:
return false;
} }
}); });
chrome.runtime.onMessageExternal.addListener((request, sender, callback) => {
if (getExtensionIdsToImportFrom().includes(sender.id)) {
if (request.message === "requestConfig") {
callback({
userID: Config.config.userID,
allowExpirements: Config.config.allowExpirements,
showDonationLink: Config.config.showDonationLink,
showUpsells: Config.config.showUpsells,
darkMode: Config.config.darkMode,
})
}
}
});
chrome.runtime.onConnect.addListener((port) => {
if (port.name === "popup") {
chrome.tabs.query({
active: true,
currentWindow: true
}, tabs => {
popupPort[tabs[0].id] = port;
});
}
});
//add help page on install //add help page on install
chrome.runtime.onInstalled.addListener(function () { chrome.runtime.onInstalled.addListener(function () {
// This let's the config sync to run fully before checking. // This let's the config sync to run fully before checking.
// This is required on Firefox // This is required on Firefox
setTimeout(async () => { setTimeout(function() {
const userID = Config.config.userID; const userID = Config.config.userID;
// If there is no userID, then it is the first install. // If there is no userID, then it is the first install.
if (!userID && !Config.local.alreadyInstalled){ if (!userID){
//open up the install page //open up the install page
chrome.tabs.create({url: chrome.runtime.getURL("/help/index.html")}); chrome.tabs.create({url: chrome.extension.getURL("/help/index.html")});
//generate a userID //generate a userID
const newUserID = generateUserID(); const newUserID = utils.generateUserID();
//save this UUID //save this UUID
Config.config.userID = newUserID; Config.config.userID = newUserID;
Config.local.alreadyInstalled = true;
// Don't show update notification // Don't show update notification
Config.config.categoryPillUpdate = true; Config.config.categoryPillUpdate = true;
} }
if (Config.config.supportInvidious) {
if (!(await utils.containsInvidiousPermission())) {
chrome.tabs.create({url: chrome.runtime.getURL("/permissions/index.html")});
}
}
getHash(Config.config!.userID!).then((userID) => {
if (userID == "60eed03c8644b7efa32df06977b3a4c11b62f63518e74a0e29baa1fd449cb54f") {
Config.config.prideTheme = true;
}
});
}, 1500); }, 1500);
if (!isFirefoxOrSafari()) {
injectUpdatedScripts().catch(logWarn);
waitFor(() => Config.isReady()).then(() => {
if (Config.config.supportInvidious) {
injectUpdatedScripts([
utils.getExtraSiteRegistration()
])
}
}).catch(logWarn);
}
}); });
/** /**
* Only works on Firefox. * Only works on Firefox.
* Firefox requires that it be applied after every extension restart. * Firefox requires that it be applied after every extension restart.
* *
* @param {JSON} options * @param {JSON} options
*/ */
async function registerFirefoxContentScript(options: Registration) { function registerFirefoxContentScript(options: Registration) {
if ("scripting" in chrome && "getRegisteredContentScripts" in chrome.scripting) { const oldRegistration = contentScriptRegistrations[options.id];
const existingRegistrations = await chromeP.scripting.getRegisteredContentScripts({ if (oldRegistration) oldRegistration.unregister();
ids: [options.id]
}).catch(() => []);
if (existingRegistrations && existingRegistrations.length > 0
&& options.matches.every((match) => existingRegistrations[0].matches.includes(match))) {
// No need to register another script, already registered
return;
}
}
await unregisterFirefoxContentScript(options.id);
if ("scripting" in chrome && "getRegisteredContentScripts" in chrome.scripting) {
await chromeP.scripting.registerContentScripts([{
id: options.id,
runAt: "document_start",
matches: options.matches,
allFrames: options.allFrames,
js: options.js,
css: options.css,
persistAcrossSessions: true,
}]);
} else {
chrome.contentScripts.register({
allFrames: options.allFrames,
js: options.js?.map?.(file => ({file})),
css: options.css?.map?.(file => ({file})),
matches: options.matches
}).then((registration) => void (contentScriptRegistrations[options.id] = registration));
}
browser.contentScripts.register({
allFrames: options.allFrames,
js: options.js,
css: options.css,
matches: options.matches
}).then((registration) => void (contentScriptRegistrations[options.id] = registration));
} }
/** /**
* Only works on Firefox. * Only works on Firefox.
* Firefox requires that this is handled by the background script * Firefox requires that this is handled by the background script
*
*/ */
async function unregisterFirefoxContentScript(id: string) { function unregisterFirefoxContentScript(id: string) {
if ("scripting" in chrome && "getRegisteredContentScripts" in chrome.scripting) { contentScriptRegistrations[id].unregister();
try { delete contentScriptRegistrations[id];
await chromeP.scripting.unregisterContentScripts({
ids: [id]
});
} catch (e) {
// Not registered yet
}
} else {
if (contentScriptRegistrations[id]) {
contentScriptRegistrations[id].unregister();
delete contentScriptRegistrations[id];
}
}
} }
async function submitVote(type: number, UUID: string, category: string, videoID: string) { async function submitVote(type: number, UUID: string, category: string) {
let userID = Config.config.userID; let userID = Config.config.userID;
if (userID == undefined || userID === "undefined") { if (userID == undefined || userID === "undefined") {
//generate one //generate one
userID = generateUserID(); userID = utils.generateUserID();
Config.config.userID = userID; Config.config.userID = userID;
} }
const typeSection = (type !== undefined) ? "&type=" + type : "&category=" + category; const typeSection = (type !== undefined) ? "&type=" + type : "&category=" + category;
try { //publish this vote
const response = await asyncRequestToServer("POST", "/api/voteOnSponsorTime?UUID=" + UUID + "&videoID=" + videoID + "&userID=" + userID + typeSection); const response = await asyncRequestToServer("POST", "/api/voteOnSponsorTime?UUID=" + UUID + "&userID=" + userID + typeSection);
if (response.ok) {
return { return {
status: response.status, successType: 1,
ok: response.ok, responseText: await response.text()
responseText: await response.text(),
}; };
} catch (e) { } else if (response.status == 405) {
console.error("Error while voting:", e); //duplicate vote
return { return {
error: serializeOrStringify(e), successType: 0,
statusCode: response.status,
responseText: await response.text()
};
} else {
//error while connect
return {
successType: -1,
statusCode: response.status,
responseText: await response.text()
}; };
} }
} }
async function asyncRequestToServer(type: string, address: string, data = {}) { async function asyncRequestToServer(type: string, address: string, data = {}) {
const serverAddress = Config.config.testingServer ? CompileConfig.testingServerAddress : Config.config.serverAddress; const serverAddress = Config.config.testingServer ? CompileConfig.testingServerAddress : Config.config.serverAddress;
return await (sendRealRequestToCustomServer(type, serverAddress + address, data)); return await (sendRequestToCustomServer(type, serverAddress + address, data));
} }
/**
* Sends a request to the specified url
*
* @param type The request type "GET", "POST", etc.
* @param address The address to add to the SponsorBlock server address
* @param callback
*/
async function sendRequestToCustomServer(type: string, url: string, data = {}) {
// If GET, convert JSON to parameters
if (type.toLowerCase() === "get") {
url = utils.objectToURI(url, data, true);
data = null;
}
const response = await fetch(url, {
method: type,
headers: {
'Content-Type': 'application/json'
},
redirect: 'follow',
body: data ? JSON.stringify(data) : null
});
return response;
}

View File

@@ -0,0 +1,75 @@
import * as React from "react";
import * as CompileConfig from "../../config.json";
import { Category } from "../types";
import CategorySkipOptionsComponent from "./CategorySkipOptionsComponent";
export interface CategoryChooserProps {
}
export interface CategoryChooserState {
}
class CategoryChooserComponent extends React.Component<CategoryChooserProps, CategoryChooserState> {
constructor(props: CategoryChooserProps) {
super(props);
// Setup state
this.state = {
}
}
render(): React.ReactElement {
return (
<table id="categoryChooserTable"
className="categoryChooserTable">
<tbody>
{/* Headers */}
<tr id={"CategoryOptionsRow"}
className="categoryTableElement categoryTableHeader">
<th id={"CategoryOptionName"}>
{chrome.i18n.getMessage("category")}
</th>
<th id={"CategorySkipOption"}
className="skipOption">
{chrome.i18n.getMessage("skipOption")}
</th>
<th id={"CategoryColorOption"}
className="colorOption">
{chrome.i18n.getMessage("seekBarColor")}
</th>
<th id={"CategoryPreviewColorOption"}
className="previewColorOption">
{chrome.i18n.getMessage("previewColor")}
</th>
</tr>
{this.getCategorySkipOptions()}
</tbody>
</table>
);
}
getCategorySkipOptions(): JSX.Element[] {
const elements: JSX.Element[] = [];
for (const category of CompileConfig.categoryList) {
elements.push(
<CategorySkipOptionsComponent category={category as Category}
key={category}>
</CategorySkipOptionsComponent>
);
}
return elements;
}
}
export default CategoryChooserComponent;

View File

@@ -6,15 +6,12 @@ import ThumbsUpSvg from "../svg-icons/thumbs_up_svg";
import ThumbsDownSvg from "../svg-icons/thumbs_down_svg"; import ThumbsDownSvg from "../svg-icons/thumbs_down_svg";
import { downvoteButtonColor, SkipNoticeAction } from "../utils/noticeUtils"; import { downvoteButtonColor, SkipNoticeAction } from "../utils/noticeUtils";
import { VoteResponse } from "../messageTypes"; import { VoteResponse } from "../messageTypes";
import { AnimationUtils } from "../../maze-utils/src/animationUtils"; import { AnimationUtils } from "../utils/animationUtils";
import { GenericUtils } from "../utils/genericUtils";
import { Tooltip } from "../render/Tooltip"; import { Tooltip } from "../render/Tooltip";
import { formatJSErrorMessage, getLongErrorMessage } from "../../maze-utils/src/formating";
import { logRequest } from "../../maze-utils/src/background-request-proxy";
export interface CategoryPillProps { export interface CategoryPillProps {
vote: (type: number, UUID: SegmentUUID, category?: Category) => Promise<VoteResponse>; vote: (type: number, UUID: SegmentUUID, category?: Category) => Promise<VoteResponse>;
showTextByDefault: boolean;
showTooltipOnClick: boolean;
} }
export interface CategoryPillState { export interface CategoryPillState {
@@ -24,14 +21,12 @@ export interface CategoryPillState {
} }
class CategoryPillComponent extends React.Component<CategoryPillProps, CategoryPillState> { class CategoryPillComponent extends React.Component<CategoryPillProps, CategoryPillState> {
mainRef: React.MutableRefObject<HTMLSpanElement>;
tooltip?: Tooltip; tooltip?: Tooltip;
constructor(props: CategoryPillProps) { constructor(props: CategoryPillProps) {
super(props); super(props);
this.mainRef = React.createRef();
this.state = { this.state = {
segment: null, segment: null,
show: false, show: false,
@@ -46,29 +41,20 @@ class CategoryPillComponent extends React.Component<CategoryPillProps, CategoryP
color: this.getTextColor(), color: this.getTextColor(),
} }
// To be able to remove the margin from the parent
this.mainRef?.current?.parentElement?.classList?.toggle("cbPillOpen", this.state.show);
return ( return (
<span style={style} <span style={style}
className={"sponsorBlockCategoryPill" + (!this.props.showTextByDefault ? " sbPillNoText" : "")} className={"sponsorBlockCategoryPill"}
aria-label={this.getTitleText()} aria-label={this.getTitleText()}
onClick={(e) => this.toggleOpen(e)} onClick={(e) => this.toggleOpen(e)}
onMouseEnter={() => this.openTooltip()} onMouseEnter={() => this.openTooltip()}
onMouseLeave={() => this.closeTooltip()} onMouseLeave={() => this.closeTooltip()}>
ref={this.mainRef}>
<span className="sponsorBlockCategoryPillTitleSection"> <span className="sponsorBlockCategoryPillTitleSection">
<img className="sponsorSkipLogo sponsorSkipObject" <img className="sponsorSkipLogo sponsorSkipObject"
src={chrome.runtime.getURL(Config.config.prideTheme ? "icons/sb-pride.png" : "icons/IconSponsorBlocker256px.png")}> src={chrome.extension.getURL("icons/IconSponsorBlocker256px.png")}>
</img> </img>
<span className="sponsorBlockCategoryPillTitle">
{ {chrome.i18n.getMessage("category_" + this.state.segment?.category)}
(this.props.showTextByDefault || this.state.open) && </span>
<span className="sponsorBlockCategoryPillTitle">
{chrome.i18n.getMessage("category_" + this.state.segment?.category)}
</span>
}
</span> </span>
{this.state.open && ( {this.state.open && (
@@ -93,12 +79,9 @@ class CategoryPillComponent extends React.Component<CategoryPillProps, CategoryP
)} )}
{/* Close Button */} {/* Close Button */}
<img src={chrome.runtime.getURL("icons/close.png")} <img src={chrome.extension.getURL("icons/close.png")}
className="categoryPillClose" className="categoryPillClose"
onClick={() => { onClick={() => this.setState({ show: false })}>
this.setState({ show: false });
this.closeTooltip();
}}>
</img> </img>
</span> </span>
); );
@@ -108,14 +91,6 @@ class CategoryPillComponent extends React.Component<CategoryPillProps, CategoryP
event.stopPropagation(); event.stopPropagation();
if (this.state.show) { if (this.state.show) {
if (this.props.showTooltipOnClick) {
if (this.state.open) {
this.closeTooltip();
} else {
this.openTooltip();
}
}
this.setState({ open: !this.state.open }); this.setState({ open: !this.state.open });
} }
} }
@@ -128,57 +103,59 @@ class CategoryPillComponent extends React.Component<CategoryPillProps, CategoryP
const response = await this.props.vote(type, this.state.segment.UUID); const response = await this.props.vote(type, this.state.segment.UUID);
await stopAnimation(); await stopAnimation();
if ("error" in response) { if (response.successType == 1 || (response.successType == -1 && response.statusCode == 429)) {
console.error("[SB] Caught error while attempting to vote on a FV label", response.error); this.setState({
alert(formatJSErrorMessage(response.error)); open: false,
} else if (response.ok || response.status === 429) {
this.setState({
open: false,
show: type === 1 show: type === 1
}); });
} else if (response.statusCode !== 403) {
this.closeTooltip(); alert(GenericUtils.getErrorMessage(response.statusCode, response.responseText));
} else if (response.status !== 403) {
logRequest({headers: null, ...response}, "SB", "vote on FV label");
alert(getLongErrorMessage(response.status, response.responseText));
} }
} }
} }
private getColor(): string { private getColor(): string {
// Handled by setCategoryColorCSSVariables() of content.ts const configObject = Config.config.barTypes["preview-" + this.state.segment?.category]
const category = this.state.segment?.category; || Config.config.barTypes[this.state.segment?.category];
return category == null ? null : `var(--sb-category-preview-${category}, var(--sb-category-${category}))`; return configObject?.color;
} }
private getTextColor(): string { private getTextColor(): string {
// Handled by setCategoryColorCSSVariables() of content.ts const color = this.getColor();
const category = this.state.segment?.category; if (!color) return null;
return category == null ? null : `var(--sb-category-text-preview-${category}, var(--sb-category-text-${category}))`;
const existingCalculatedColor = Config.config.categoryPillColors[this.state.segment?.category];
if (existingCalculatedColor && existingCalculatedColor.lastColor === color) {
return existingCalculatedColor.textColor;
} else {
const luminance = GenericUtils.getLuminance(color);
const textColor = luminance > 128 ? "black" : "white";
Config.config.categoryPillColors[this.state.segment?.category] = {
lastColor: color,
textColor
};
return textColor;
}
} }
private openTooltip(): void { private openTooltip(): void {
if (this.tooltip) { const tooltipMount = document.querySelector("ytd-video-primary-info-renderer > #container") as HTMLElement;
this.tooltip.close();
}
const tooltipMount = document.querySelector("#above-the-fold, ytm-slim-owner-renderer") as HTMLElement;
if (tooltipMount) { if (tooltipMount) {
this.tooltip = new Tooltip({ this.tooltip = new Tooltip({
text: this.getTitleText(), text: this.getTitleText(),
referenceNode: tooltipMount, referenceNode: tooltipMount,
bottomOffset: "0px", bottomOffset: "70px",
opacity: 0.95, opacity: 0.95,
displayTriangle: false, displayTriangle: false,
showLogo: false, showLogo: false,
showGotIt: false, showGotIt: false
prependElement: tooltipMount.firstElementChild as HTMLElement
}); });
} }
} }
private closeTooltip(): void { private closeTooltip(): void {
this.tooltip?.close?.(); this.tooltip?.close();
this.tooltip = null; this.tooltip = null;
} }

View File

@@ -0,0 +1,195 @@
import * as React from "react";
import Config from "../config"
import * as CompileConfig from "../../config.json";
import { Category, CategorySkipOption } from "../types";
import { getCategorySuffix } from "../utils/categoryUtils";
export interface CategorySkipOptionsProps {
category: Category;
defaultColor?: string;
defaultPreviewColor?: string;
}
export interface CategorySkipOptionsState {
color: string;
previewColor: string;
}
class CategorySkipOptionsComponent extends React.Component<CategorySkipOptionsProps, CategorySkipOptionsState> {
constructor(props: CategorySkipOptionsProps) {
super(props);
// Setup state
this.state = {
color: props.defaultColor || Config.config.barTypes[this.props.category]?.color,
previewColor: props.defaultPreviewColor || Config.config.barTypes["preview-" + this.props.category]?.color,
}
}
render(): React.ReactElement {
let defaultOption = "disable";
// Set the default opton properly
for (const categorySelection of Config.config.categorySelections) {
if (categorySelection.name === this.props.category) {
switch (categorySelection.option) {
case CategorySkipOption.ShowOverlay:
defaultOption = "showOverlay";
break;
case CategorySkipOption.ManualSkip:
defaultOption = "manualSkip";
break;
case CategorySkipOption.AutoSkip:
defaultOption = "autoSkip";
break;
}
break;
}
}
return (
<>
<tr id={this.props.category + "OptionsRow"}
className="categoryTableElement">
<td id={this.props.category + "OptionName"}
className="categoryTableLabel">
{chrome.i18n.getMessage("category_" + this.props.category)}
</td>
<td id={this.props.category + "SkipOption"}
className="skipOption">
<select
className="optionsSelector"
defaultValue={defaultOption}
onChange={this.skipOptionSelected.bind(this)}>
{this.getCategorySkipOptions()}
</select>
</td>
<td id={this.props.category + "ColorOption"}
className="colorOption">
<input
className="categoryColorTextBox option-text-box"
type="color"
onChange={(event) => this.setColorState(event, false)}
value={this.state.color} />
</td>
{this.props.category !== "exclusive_access" &&
<td id={this.props.category + "PreviewColorOption"}
className="previewColorOption">
<input
className="categoryColorTextBox option-text-box"
type="color"
onChange={(event) => this.setColorState(event, true)}
value={this.state.previewColor} />
</td>
}
</tr>
<tr id={this.props.category + "DescriptionRow"}
className="small-description categoryTableDescription">
<td
colSpan={2}>
{chrome.i18n.getMessage("category_" + this.props.category + "_description")}
{' '}
<a href={CompileConfig.wikiLinks[this.props.category]} target="_blank" rel="noreferrer">
{`${chrome.i18n.getMessage("LearnMore")}`}
</a>
</td>
</tr>
</>
);
}
skipOptionSelected(event: React.ChangeEvent<HTMLSelectElement>): void {
let option: CategorySkipOption;
this.removeCurrentCategorySelection();
switch (event.target.value) {
case "disable":
return;
case "showOverlay":
option = CategorySkipOption.ShowOverlay;
break;
case "manualSkip":
option = CategorySkipOption.ManualSkip;
break;
case "autoSkip":
option = CategorySkipOption.AutoSkip;
break;
}
Config.config.categorySelections.push({
name: this.props.category,
option: option
});
// Forces the Proxy to send this to the chrome storage API
Config.config.categorySelections = Config.config.categorySelections;
}
/** Removes this category from the config list of category selections */
removeCurrentCategorySelection(): void {
// Remove it if it exists
for (let i = 0; i < Config.config.categorySelections.length; i++) {
if (Config.config.categorySelections[i].name === this.props.category) {
Config.config.categorySelections.splice(i, 1);
// Forces the Proxy to send this to the chrome storage API
Config.config.categorySelections = Config.config.categorySelections;
break;
}
}
}
getCategorySkipOptions(): JSX.Element[] {
const elements: JSX.Element[] = [];
let optionNames = ["disable", "showOverlay", "manualSkip", "autoSkip"];
if (this.props.category === "exclusive_access") optionNames = ["disable", "showOverlay"];
for (const optionName of optionNames) {
elements.push(
<option key={optionName} value={optionName}>
{chrome.i18n.getMessage(optionName !== "disable" ? optionName + getCategorySuffix(this.props.category)
: optionName)}
</option>
);
}
return elements;
}
setColorState(event: React.FormEvent<HTMLInputElement>, preview: boolean): void {
if (preview) {
this.setState({
previewColor: event.currentTarget.value
});
Config.config.barTypes["preview-" + this.props.category].color = event.currentTarget.value;
} else {
this.setState({
color: event.currentTarget.value
});
Config.config.barTypes[this.props.category].color = event.currentTarget.value;
}
// Make listener get called
Config.config.barTypes = Config.config.barTypes;
}
}
export default CategorySkipOptionsComponent;

View File

@@ -1,138 +0,0 @@
import * as React from "react";
import Config from "../config";
import { ActionType, Category, SegmentUUID, SponsorTime } from "../types";
import ThumbsUpSvg from "../svg-icons/thumbs_up_svg";
import ThumbsDownSvg from "../svg-icons/thumbs_down_svg";
import { downvoteButtonColor, SkipNoticeAction } from "../utils/noticeUtils";
import { VoteResponse } from "../messageTypes";
import { AnimationUtils } from "../../maze-utils/src/animationUtils";
import { Tooltip } from "../render/Tooltip";
import { formatJSErrorMessage, getLongErrorMessage } from "../../maze-utils/src/formating";
import { logRequest } from "../../maze-utils/src/background-request-proxy";
export interface ChapterVoteProps {
vote: (type: number, UUID: SegmentUUID, category?: Category) => Promise<VoteResponse>;
size?: string;
}
export interface ChapterVoteState {
segment?: SponsorTime;
show: boolean;
size?: string;
}
class ChapterVoteComponent extends React.Component<ChapterVoteProps, ChapterVoteState> {
tooltip?: Tooltip;
constructor(props: ChapterVoteProps) {
super(props);
this.state = {
segment: null,
show: false,
size: props.size ?? "22px"
};
}
render(): React.ReactElement {
if (this.tooltip && !this.state.show) {
this.tooltip.close();
this.tooltip = null;
}
return (
<>
{/* Upvote Button */}
<button id={"sponsorTimesDownvoteButtonsContainerUpvoteChapter"}
className={"playerButton sbPlayerUpvote ytp-button " + (!this.state.show ? "sbhidden " : " ") + (document.location.host === "tv.youtube.com" ? "sbButtonYTTV" : "")}
draggable="false"
title={chrome.i18n.getMessage("upvoteButtonInfo")}
onClick={(e) => this.vote(e, 1)}>
<ThumbsUpSvg className="playerButtonImage sbChapterVoteButton"
fill={Config.config.colorPalette.white}
width={this.state.size} height={this.state.size} />
</button>
{/* Downvote Button */}
<button id={"sponsorTimesDownvoteButtonsContainerDownvoteChapter"}
className={"playerButton sbPlayerDownvote ytp-button " + (!this.state.show ? "sbhidden " : " ") + (document.location.host === "tv.youtube.com" ? "sbButtonYTTV" : "")}
draggable="false"
title={chrome.i18n.getMessage("reportButtonInfo")}
onClick={(e) => {
const chapterNode = document.querySelector(".ytp-chapter-container") as HTMLElement;
if (this.tooltip) {
this.tooltip.close();
this.tooltip = null;
} else {
if (this.state.segment?.actionType === ActionType.Chapter) {
const referenceNode = chapterNode?.parentElement?.parentElement;
if (referenceNode) {
const outerBounding = referenceNode.getBoundingClientRect();
const buttonBounding = (e.target as HTMLElement)?.parentElement?.getBoundingClientRect();
this.tooltip = new Tooltip({
referenceNode: chapterNode?.parentElement?.parentElement,
prependElement: chapterNode?.parentElement,
showLogo: false,
showGotIt: false,
bottomOffset: `${outerBounding.height + 25}px`,
leftOffset: `${buttonBounding.x - outerBounding.x}px`,
extraClass: "centeredSBTriangle",
buttons: [
{
name: chrome.i18n.getMessage("incorrectVote"),
listener: (event) => this.vote(event, 0, e.target as HTMLElement).then(() => {
this.tooltip?.close();
this.tooltip = null;
})
}, {
name: chrome.i18n.getMessage("harmfulVote"),
listener: (event) => this.vote(event, 30, e.target as HTMLElement).then(() => {
this.tooltip?.close();
this.tooltip = null;
})
}
]
});
}
} else {
this.vote(e, 0, e.target as HTMLElement)
}
}
}}>
<ThumbsDownSvg
className="playerButtonImage sbChapterVoteButton"
fill={downvoteButtonColor(this.state.segment ? [this.state.segment] : null, SkipNoticeAction.Downvote, SkipNoticeAction.Downvote)}
width={this.state.size}
height={this.state.size} />
</button>
</>
);
}
private async vote(event: React.MouseEvent, type: number, element?: HTMLElement): Promise<void> {
event.stopPropagation();
if (this.state.segment) {
const stopAnimation = AnimationUtils.applyLoadingAnimation(element ?? event.currentTarget as HTMLElement, 0.3);
const response = await this.props.vote(type, this.state.segment.UUID);
await stopAnimation();
if ("error" in response){
console.error("[SB] Caught error while attempting to vote on a chapter", response.error);
alert(formatJSErrorMessage(response.error));
} else if (response.ok || response.status == 429) {
this.setState({
show: type === 1
});
} else if (response.status !== 403) {
logRequest({headers: null, ...response}, "SB", "vote on chapter");
alert(getLongErrorMessage(response.status, response.responseText));
}
}
}
}
export default ChapterVoteComponent;

View File

@@ -1,8 +1,9 @@
import * as React from "react"; import * as React from "react";
import { createRoot, Root } from 'react-dom/client'; import * as ReactDOM from "react-dom";
import Config from "../../config"; import Config from "../config";
import { Keybind } from "../types";
import KeybindDialogComponent from "./KeybindDialogComponent"; import KeybindDialogComponent from "./KeybindDialogComponent";
import { formatKey, Keybind, keybindEquals, keybindToString } from "../../../maze-utils/src/config"; import { keybindEquals, keybindToString, formatKey } from "../utils/configUtils";
export interface KeybindProps { export interface KeybindProps {
option: string; option: string;
@@ -13,7 +14,6 @@ export interface KeybindState {
} }
let dialog; let dialog;
let root: Root;
class KeybindComponent extends React.Component<KeybindProps, KeybindState> { class KeybindComponent extends React.Component<KeybindProps, KeybindState> {
constructor(props: KeybindProps) { constructor(props: KeybindProps) {
@@ -56,12 +56,11 @@ class KeybindComponent extends React.Component<KeybindProps, KeybindState> {
dialog = parent.document.createElement("div"); dialog = parent.document.createElement("div");
dialog.id = "keybind-dialog"; dialog.id = "keybind-dialog";
parent.document.body.prepend(dialog); parent.document.body.prepend(dialog);
root = createRoot(dialog); ReactDOM.render(<KeybindDialogComponent option={this.props.option} closeListener={(updateWith) => this.closeEditDialog(updateWith)} />, dialog);
root.render(<KeybindDialogComponent option={this.props.option} closeListener={(updateWith) => this.closeEditDialog(updateWith)} />);
} }
closeEditDialog(updateWith: Keybind): void { closeEditDialog(updateWith: Keybind): void {
root.unmount(); ReactDOM.unmountComponentAtNode(dialog);
dialog.remove(); dialog.remove();
if (updateWith != null) if (updateWith != null)
this.setState({keybind: updateWith}); this.setState({keybind: updateWith});

View File

@@ -1,7 +1,8 @@
import * as React from "react"; import * as React from "react";
import { ChangeEvent } from "react"; import { ChangeEvent } from "react";
import Config from "../../config"; import Config from "../config";
import { Keybind, formatKey, keybindEquals } from "../../../maze-utils/src/config"; import { Keybind } from "../types";
import { keybindEquals, formatKey } from "../utils/configUtils";
export interface KeybindDialogProps { export interface KeybindDialogProps {
option: string; option: string;
@@ -123,7 +124,7 @@ class KeybindDialogComponent extends React.Component<KeybindDialogProps, Keybind
let youtubeShortcuts: Keybind[]; let youtubeShortcuts: Keybind[];
if (/[a-zA-Z0-9,.+\-\][:]/.test(this.state.key.key)) { if (/[a-zA-Z0-9,.+\-\][:]/.test(this.state.key.key)) {
youtubeShortcuts = [{key: "k"}, {key: "j"}, {key: "l"}, {key: "p", shift: true}, {key: "n", shift: true}, {key: ","}, {key: "."}, {key: ",", shift: true}, {key: ".", shift: true}, youtubeShortcuts = [{key: "k"}, {key: "j"}, {key: "l"}, {key: "p", shift: true}, {key: "n", shift: true}, {key: ","}, {key: "."}, {key: ",", shift: true}, {key: ".", shift: true},
{key: "ArrowRight"}, {key: "ArrowLeft"}, {key: "ArrowUp"}, {key: "ArrowDown"}, {key: "c"}, {key: "o"}, {key: "ArrowRight"}, {key: "ArrowLeft"}, {key: "ArrowUp"}, {key: "ArrowDown"}, {key: "ArrowRight", ctrl: true}, {key: "ArrowLeft", ctrl: true}, {key: "c"}, {key: "o"},
{key: "w"}, {key: "+"}, {key: "-"}, {key: "f"}, {key: "t"}, {key: "i"}, {key: "m"}, {key: "a"}, {key: "s"}, {key: "d"}, {key: "Home"}, {key: "End"}, {key: "w"}, {key: "+"}, {key: "-"}, {key: "f"}, {key: "t"}, {key: "i"}, {key: "m"}, {key: "a"}, {key: "s"}, {key: "d"}, {key: "Home"}, {key: "End"},
{key: "0"}, {key: "1"}, {key: "2"}, {key: "3"}, {key: "4"}, {key: "5"}, {key: "6"}, {key: "7"}, {key: "8"}, {key: "9"}, {key: "]"}, {key: "["}]; {key: "0"}, {key: "1"}, {key: "2"}, {key: "3"}, {key: "4"}, {key: "5"}, {key: "6"}, {key: "7"}, {key: "8"}, {key: "9"}, {key: "]"}, {key: "["}];
} else { } else {
@@ -141,14 +142,9 @@ class KeybindDialogComponent extends React.Component<KeybindDialogProps, Keybind
return {message: chrome.i18n.getMessage("youtubeKeybindWarning"), blocking: false}; return {message: chrome.i18n.getMessage("youtubeKeybindWarning"), blocking: false};
} }
if (this.props.option !== "skipKeybind" && this.equals(Config.config['skipKeybind']) || if (this.props.option != "skipKeybind" && this.equals(Config.config['skipKeybind']) ||
this.props.option !== "submitKeybind" && this.equals(Config.config['submitKeybind']) || this.props.option != "submitKeybind" && this.equals(Config.config['submitKeybind']) ||
this.props.option !== "actuallySubmitKeybind" && this.equals(Config.config['actuallySubmitKeybind']) || this.props.option != "startSponsorKeybind" && this.equals(Config.config['startSponsorKeybind']))
this.props.option !== "previewKeybind" && this.equals(Config.config['previewKeybind']) ||
this.props.option !== "closeSkipNoticeKeybind" && this.equals(Config.config['closeSkipNoticeKeybind']) ||
this.props.option !== "startSponsorKeybind" && this.equals(Config.config['startSponsorKeybind']) ||
this.props.option !== "downvoteKeybind" && this.equals(Config.config['downvoteKeybind']) ||
this.props.option !== "upvoteKeybind" && this.equals(Config.config['upvoteKeybind']))
return {message: chrome.i18n.getMessage("keyAlreadyUsed"), blocking: true}; return {message: chrome.i18n.getMessage("keyAlreadyUsed"), blocking: true};
return null; return null;

View File

@@ -1,6 +1,5 @@
import * as React from "react"; import * as React from "react";
import Config from "../config"; import Config from "../config";
import SbSvg from "../svg-icons/sb_svg";
enum CountdownMode { enum CountdownMode {
Timer, Timer,
@@ -9,65 +8,45 @@ enum CountdownMode {
} }
export interface NoticeProps { export interface NoticeProps {
noticeTitle: string; noticeTitle: string,
maxCountdownTime?: () => number; maxCountdownTime?: () => number,
dontPauseCountdown?: boolean; amountOfPreviousNotices?: number,
amountOfPreviousNotices?: number; showInSecondSlot?: boolean,
showInSecondSlot?: boolean; timed?: boolean,
timed?: boolean; idSuffix?: string,
idSuffix?: string;
fadeIn?: boolean; fadeIn?: boolean,
fadeOut?: boolean; startFaded?: boolean,
startFaded?: boolean; firstColumn?: React.ReactElement,
firstColumn?: React.ReactElement[] | React.ReactElement; firstRow?: React.ReactElement,
firstRow?: React.ReactElement; bottomRow?: React.ReactElement[],
bottomRow?: React.ReactElement[];
smaller?: boolean; smaller?: boolean,
limitWidth?: boolean; limitWidth?: boolean,
extraClass?: string;
hideLogo?: boolean;
hideRightInfo?: boolean;
logoFill?: string;
// Callback for when this is closed // Callback for when this is closed
closeListener: () => void; closeListener: () => void,
onMouseEnter?: (e: React.MouseEvent<HTMLElement, MouseEvent>) => void; onMouseEnter?: (e: React.MouseEvent<HTMLElement, MouseEvent>) => void,
zIndex?: number; zIndex?: number,
style?: React.CSSProperties; style?: React.CSSProperties
biggerCloseButton?: boolean; biggerCloseButton?: boolean;
children?: React.ReactNode;
}
interface MouseDownInfo {
x: number;
y: number;
right: number;
bottom: number;
} }
export interface NoticeState { export interface NoticeState {
maxCountdownTime: () => number; noticeTitle: string,
countdownTime: number; maxCountdownTime: () => number,
countdownMode: CountdownMode;
countdownTime: number,
countdownMode: CountdownMode,
mouseHovering: boolean; mouseHovering: boolean;
startFaded: boolean; startFaded: boolean;
mouseDownInfo: MouseDownInfo | null;
mouseMoved: boolean;
right: number;
bottom: number;
} }
// Limits for dragging notice around
const bounds = [10, 100, 10, 10];
class NoticeComponent extends React.Component<NoticeProps, NoticeState> { class NoticeComponent extends React.Component<NoticeProps, NoticeState> {
countdownInterval: NodeJS.Timeout; countdownInterval: NodeJS.Timeout;
@@ -75,15 +54,9 @@ class NoticeComponent extends React.Component<NoticeProps, NoticeState> {
amountOfPreviousNotices: number; amountOfPreviousNotices: number;
parentRef: React.RefObject<HTMLDivElement>;
handleMouseMoveBinded: (e: MouseEvent) => void = this.handleMouseMove.bind(this);
constructor(props: NoticeProps) { constructor(props: NoticeProps) {
super(props); super(props);
this.parentRef = React.createRef();
const maxCountdownTime = () => { const maxCountdownTime = () => {
if (this.props.maxCountdownTime) return this.props.maxCountdownTime(); if (this.props.maxCountdownTime) return this.props.maxCountdownTime();
else return Config.config.skipNoticeDuration; else return Config.config.skipNoticeDuration;
@@ -98,6 +71,8 @@ class NoticeComponent extends React.Component<NoticeProps, NoticeState> {
// Setup state // Setup state
this.state = { this.state = {
noticeTitle: props.noticeTitle,
maxCountdownTime, maxCountdownTime,
//the countdown until this notice closes //the countdown until this notice closes
@@ -105,12 +80,7 @@ class NoticeComponent extends React.Component<NoticeProps, NoticeState> {
countdownMode: CountdownMode.Timer, countdownMode: CountdownMode.Timer,
mouseHovering: false, mouseHovering: false,
startFaded: this.props.startFaded ?? false, startFaded: this.props.startFaded ?? false
mouseDownInfo: null,
mouseMoved: false,
right: bounds[0],
bottom: props.showInSecondSlot ? 290 : bounds[1]
} }
} }
@@ -121,47 +91,19 @@ class NoticeComponent extends React.Component<NoticeProps, NoticeState> {
render(): React.ReactElement { render(): React.ReactElement {
const noticeStyle: React.CSSProperties = { const noticeStyle: React.CSSProperties = {
zIndex: this.props.zIndex || (1000 + this.amountOfPreviousNotices), zIndex: this.props.zIndex || (1000 + this.amountOfPreviousNotices),
right: this.state.right,
bottom: this.state.bottom,
userSelect: this.state.mouseDownInfo && this.state.mouseMoved ? "none" : "auto",
...(this.props.style ?? {}) ...(this.props.style ?? {})
} }
return ( return (
<div id={"sponsorSkipNotice" + this.idSuffix} <div id={"sponsorSkipNotice" + this.idSuffix}
className={"sponsorSkipObject sponsorSkipNoticeParent" className={"sponsorSkipObject sponsorSkipNoticeParent"
+ (this.props.showInSecondSlot ? " secondSkipNotice" : "") + (this.props.showInSecondSlot ? " secondSkipNotice" : "")}
+ (this.props.extraClass ? ` ${this.props.extraClass}` : "")}
onMouseEnter={(e) => this.onMouseEnter(e) } onMouseEnter={(e) => this.onMouseEnter(e) }
onMouseLeave={() => { onMouseLeave={() => this.timerMouseLeave()}
this.timerMouseLeave();
}}
onMouseDown={(e) => {
document.addEventListener("mousemove", this.handleMouseMoveBinded);
this.setState({
mouseDownInfo: {
x: e.clientX,
y: e.clientY,
right: this.state.right,
bottom: this.state.bottom
},
mouseMoved: false
});
}}
onMouseUp={() => {
document.removeEventListener("mousemove", this.handleMouseMoveBinded);
this.setState({
mouseDownInfo: null
});
}}
ref={this.parentRef}
style={noticeStyle} > style={noticeStyle} >
<div className={"sponsorSkipNoticeTableContainer" <div className={"sponsorSkipNoticeTableContainer"
+ (this.props.fadeIn ? " sponsorSkipNoticeFadeIn" : "") + (this.props.fadeIn ? " sponsorSkipNoticeFadeIn" : "")
+ (this.state.startFaded ? " sponsorSkipNoticeFaded" : "") + (this.state.startFaded ? " sponsorSkipNoticeFaded" : "") }>
+ (Config.config.prideTheme ? " prideTheme" : "")}>
<table className={"sponsorSkipObject sponsorSkipNotice" <table className={"sponsorSkipObject sponsorSkipNotice"
+ (this.props.limitWidth ? " sponsorSkipNoticeLimitWidth" : "")}> + (this.props.limitWidth ? " sponsorSkipNoticeLimitWidth" : "")}>
<tbody> <tbody>
@@ -172,26 +114,16 @@ class NoticeComponent extends React.Component<NoticeProps, NoticeState> {
{/* Left column */} {/* Left column */}
<td className="noticeLeftIcon"> <td className="noticeLeftIcon">
{/* Logo */} {/* Logo */}
{!this.props.hideLogo && <img id={"sponsorSkipLogo" + this.idSuffix}
( className="sponsorSkipLogo sponsorSkipObject"
!Config.config.prideTheme ? src={chrome.extension.getURL("icons/IconSponsorBlocker256px.png")}>
<SbSvg </img>
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} <span id={"sponsorSkipMessage" + this.idSuffix}
style={{float: "left", marginRight: this.props.hideLogo ? "0px" : null}} style={{float: "left"}}
className="sponsorSkipMessage sponsorSkipObject"> className="sponsorSkipMessage sponsorSkipObject">
{this.props.noticeTitle} {this.state.noticeTitle}
</span> </span>
{this.props.firstColumn} {this.props.firstColumn}
@@ -200,30 +132,28 @@ class NoticeComponent extends React.Component<NoticeProps, NoticeState> {
{this.props.firstRow} {this.props.firstRow}
{/* Right column */} {/* Right column */}
{!this.props.hideRightInfo && <td className="sponsorSkipNoticeRightSection"
<td className="sponsorSkipNoticeRightSection" style={{top: "9.32px"}}>
style={{top: "9.32px"}}>
{/* Time left */}
{this.props.timed ? (
<span id={"sponsorSkipNoticeTimeLeft" + this.idSuffix}
onClick={() => this.toggleManualPause()}
className="sponsorSkipObject sponsorSkipNoticeTimeLeft">
{this.getCountdownElements()}
</span>
) : ""}
{/* Time left */}
{this.props.timed ? (
<span id={"sponsorSkipNoticeTimeLeft" + this.idSuffix}
onClick={() => this.toggleManualPause()}
className="sponsorSkipObject sponsorSkipNoticeTimeLeft">
{/* Close button */} {this.getCountdownElements()}
<img src={chrome.runtime.getURL("icons/close.png")}
className={"sponsorSkipObject sponsorSkipNoticeButton sponsorSkipNoticeCloseButton sponsorSkipNoticeRightButton" </span>
+ (this.props.biggerCloseButton ? " biggerCloseButton" : "")} ) : ""}
onClick={() => this.close()}>
</img>
</td> {/* Close button */}
} <img src={chrome.extension.getURL("icons/close.png")}
className={"sponsorSkipObject sponsorSkipNoticeButton sponsorSkipNoticeCloseButton sponsorSkipNoticeRightButton"
+ (this.props.biggerCloseButton ? " biggerCloseButton" : "")}
onClick={() => this.close()}>
</img>
</td>
</tr> </tr>
{this.props.children} {this.props.children}
@@ -253,21 +183,21 @@ class NoticeComponent extends React.Component<NoticeProps, NoticeState> {
<span <span
id={"skipNoticeTimerText" + this.idSuffix} id={"skipNoticeTimerText" + this.idSuffix}
key="skipNoticeTimerText" key="skipNoticeTimerText"
className={this.state.countdownMode !== CountdownMode.Timer ? "sbhidden" : ""} > className={this.state.countdownMode !== CountdownMode.Timer ? "hidden" : ""} >
{chrome.i18n.getMessage("NoticeTimeAfterSkip").replace("{seconds}", Math.ceil(this.state.countdownTime).toString())} {this.state.countdownTime + "s"}
</span> </span>
),( ),(
<img <img
id={"skipNoticeTimerPaused" + this.idSuffix} id={"skipNoticeTimerPaused" + this.idSuffix}
key="skipNoticeTimerPaused" key="skipNoticeTimerPaused"
className={this.state.countdownMode !== CountdownMode.Paused ? "sbhidden" : ""} className={this.state.countdownMode !== CountdownMode.Paused ? "hidden" : ""}
src={chrome.runtime.getURL("icons/pause.svg")} src={chrome.runtime.getURL("icons/pause.svg")}
alt={chrome.i18n.getMessage("paused")} /> alt={chrome.i18n.getMessage("paused")} />
),( ),(
<img <img
id={"skipNoticeTimerStopped" + this.idSuffix} id={"skipNoticeTimerStopped" + this.idSuffix}
key="skipNoticeTimerStopped" key="skipNoticeTimerStopped"
className={this.state.countdownMode !== CountdownMode.Stopped ? "sbhidden" : ""} className={this.state.countdownMode !== CountdownMode.Stopped ? "hidden" : ""}
src={chrome.runtime.getURL("icons/stop.svg")} src={chrome.runtime.getURL("icons/stop.svg")}
alt={chrome.i18n.getMessage("manualPaused")} /> alt={chrome.i18n.getMessage("manualPaused")} />
)]; )];
@@ -336,7 +266,7 @@ class NoticeComponent extends React.Component<NoticeProps, NoticeState> {
return; return;
} }
if (countdownTime == 3 && this.props.fadeOut) { if (countdownTime == 3) {
//start fade out animation //start fade out animation
const notice = document.getElementById("sponsorSkipNotice" + this.idSuffix); const notice = document.getElementById("sponsorSkipNotice" + this.idSuffix);
notice?.style.removeProperty("animation"); notice?.style.removeProperty("animation");
@@ -356,7 +286,7 @@ class NoticeComponent extends React.Component<NoticeProps, NoticeState> {
} }
pauseCountdown(): void { pauseCountdown(): void {
if (!this.props.timed || this.props.dontPauseCountdown) return; if (!this.props.timed) return;
//remove setInterval //remove setInterval
if (this.countdownInterval) clearInterval(this.countdownInterval); if (this.countdownInterval) clearInterval(this.countdownInterval);
@@ -414,6 +344,12 @@ class NoticeComponent extends React.Component<NoticeProps, NoticeState> {
if (!silent) this.props.closeListener(); if (!silent) this.props.closeListener();
} }
changeNoticeTitle(title: string): void {
this.setState({
noticeTitle: title
});
}
addNoticeInfoMessage(message: string, message2 = ""): void { addNoticeInfoMessage(message: string, message2 = ""): void {
//TODO: Replace //TODO: Replace
@@ -448,35 +384,6 @@ class NoticeComponent extends React.Component<NoticeProps, NoticeState> {
document.querySelector("#sponsorSkipNotice" + this.idSuffix + " > tbody").insertBefore(thanksForVotingText2, document.getElementById("sponsorSkipNoticeSpacer" + this.idSuffix)); document.querySelector("#sponsorSkipNotice" + this.idSuffix + " > tbody").insertBefore(thanksForVotingText2, document.getElementById("sponsorSkipNoticeSpacer" + this.idSuffix));
} }
} }
getElement(): React.RefObject<HTMLDivElement> {
return this.parentRef;
}
componentWillUnmount(): void {
document.removeEventListener("mousemove", this.handleMouseMoveBinded);
}
// For dragging around notice
handleMouseMove(e: MouseEvent): void {
if (this.state.mouseDownInfo && e.buttons === 1) {
const [mouseX, mouseY] = [e.clientX, e.clientY];
const deltaX = mouseX - this.state.mouseDownInfo.x;
const deltaY = mouseY - this.state.mouseDownInfo.y;
if (deltaX > 0 || deltaY > 0) this.setState({ mouseMoved: true });
const element = this.parentRef.current;
const parent = element.parentElement.parentElement;
this.setState({
right: Math.min(parent.clientWidth - element.clientWidth - bounds[2], Math.max(bounds[0], this.state.mouseDownInfo.right - deltaX)),
bottom: Math.min(parent.clientHeight - element.clientHeight - bounds[3], Math.max(bounds[1], this.state.mouseDownInfo.bottom - deltaY))
});
} else {
document.removeEventListener("mousemove", this.handleMouseMoveBinded);
}
}
} }
export default NoticeComponent; export default NoticeComponent;

Some files were not shown because too many files have changed in this diff Show More