Compare commits

...

11 Commits

Author SHA1 Message Date
Ajay
07cd292bee bump version 2025-06-30 02:22:13 -04:00
Ajay
3b42a5a35b update translations 2025-06-30 02:22:03 -04:00
Ajay
fafff3d9a8 Fix showing minutes saved for local skipped time instead of formatted time 2025-06-29 01:43:19 -04:00
Ajay
b7fc3a8223 Fix your work box precision 2025-06-29 01:41:01 -04:00
Ajay
d2b859c5d8 Remove old chapter rendering logic 2025-06-25 02:48:45 -04:00
Ajay
17c49ace63 Fix segments appearing in chapter bar even when category disabled
Fixes #2292
2025-06-25 02:25:07 -04:00
Ajay
fa7b9eee01 FIx skip to highlight button still showing when highlight disabled
#2292
2025-06-25 02:22:55 -04:00
Ajay
6ad146e93d Fix donate link appearing on safari 2025-06-24 14:27:57 -04:00
Ajay
02b6ec7c6f Disable selenium test for now because of new captchas 2025-06-24 00:51:53 -04:00
Ajay
9ee80cca99 Count chrome driver mismatch as failure 2025-06-23 18:41:25 -04:00
Ajay
950b5dd6c4 Use default chrome driver version 2025-06-23 18:37:00 -04:00
10 changed files with 28 additions and 34 deletions

View File

@@ -16,13 +16,6 @@ jobs:
with:
node-version: '18'
- run: npm ci
- run: sudo apt-get remove google-chrome-stable
- uses: browser-actions/setup-chrome@c785b87e244131f27c9f19c1a33e2ead956ab7ce
with:
chrome-version: 135
install-dependencies: true
install-chromedriver: true
- name: Copy configuration
run: cp config.json.example config.json

View File

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

16
package-lock.json generated
View File

@@ -41,7 +41,7 @@
"@types/wicg-mediasession": "^1.1.4",
"@typescript-eslint/eslint-plugin": "^5.54.1",
"@typescript-eslint/parser": "^5.54.1",
"chromedriver": "^135.0.0",
"chromedriver": "^137.0.0",
"concurrently": "^7.6.0",
"copy-webpack-plugin": "^11.0.0",
"eslint": "^8.35.0",
@@ -4085,9 +4085,9 @@
}
},
"node_modules/chromedriver": {
"version": "135.0.3",
"resolved": "https://registry.npmjs.org/chromedriver/-/chromedriver-135.0.3.tgz",
"integrity": "sha512-ZVd9NhChPm8u1s1kSYpEaTtoS6bEVnv8GdvTfKONicbLz57zLU5mxYILiz8qs5rXxig4QhB6+hSmJ1ki+s+L3A==",
"version": "137.0.4",
"resolved": "https://registry.npmjs.org/chromedriver/-/chromedriver-137.0.4.tgz",
"integrity": "sha512-IxipIe0AnoQhWvG6eSTOLhVf1Tt586LA1IH4RdhGhXrrK6nZx8+VcKdjtlyZIV60S0CttUij/YnYuHAI+7qzWg==",
"dev": true,
"hasInstallScript": true,
"license": "Apache-2.0",
@@ -4104,7 +4104,7 @@
"chromedriver": "bin/chromedriver"
},
"engines": {
"node": ">=18"
"node": ">=20"
}
},
"node_modules/ci-info": {
@@ -17005,9 +17005,9 @@
}
},
"chromedriver": {
"version": "135.0.3",
"resolved": "https://registry.npmjs.org/chromedriver/-/chromedriver-135.0.3.tgz",
"integrity": "sha512-ZVd9NhChPm8u1s1kSYpEaTtoS6bEVnv8GdvTfKONicbLz57zLU5mxYILiz8qs5rXxig4QhB6+hSmJ1ki+s+L3A==",
"version": "137.0.4",
"resolved": "https://registry.npmjs.org/chromedriver/-/chromedriver-137.0.4.tgz",
"integrity": "sha512-IxipIe0AnoQhWvG6eSTOLhVf1Tt586LA1IH4RdhGhXrrK6nZx8+VcKdjtlyZIV60S0CttUij/YnYuHAI+7qzWg==",
"dev": true,
"requires": {
"@testim/chrome-version": "^1.1.4",

View File

@@ -23,7 +23,7 @@
"@types/wicg-mediasession": "^1.1.4",
"@typescript-eslint/eslint-plugin": "^5.54.1",
"@typescript-eslint/parser": "^5.54.1",
"chromedriver": "^135.0.0",
"chromedriver": "^137.0.0",
"concurrently": "^7.6.0",
"copy-webpack-plugin": "^11.0.0",
"eslint": "^8.35.0",

View File

@@ -102,10 +102,6 @@ div:hover > #previewbar.sbNotInvidious {
display: none !important;
}
.ytp-tooltip.sponsorCategoryTooltipVisible:not(.sponsorTooltipHasYTChapters) {
transform: translateY(-1em) !important;
}
/* Pull up for precise seeking */
.ytp-tooltip.sponsorCategoryTooltipVisible .ytp-tooltip-edu {
transform: translateY(-1em) !important;

View File

@@ -1355,7 +1355,9 @@ function startSkipScheduleCheckingForStartSponsors() {
// For highlight category
const poiSegments = sponsorTimes
.filter((time) => time.segment[1] > getCurrentTime()
&& time.actionType === ActionType.Poi && time.hidden === SponsorHideType.Visible)
&& time.actionType === ActionType.Poi
&& time.hidden === SponsorHideType.Visible
&& getCategorySelection(time).option !== CategorySkipOption.Disabled)
.sort((a, b) => b.segment[0] - a.segment[0]);
for (const time of poiSegments) {
const skipOption = getCategorySelection(time)?.option;

View File

@@ -5,7 +5,7 @@ https://github.com/videosegments/videosegments/commits/f1e111bdfe231947800c6efdd
import Config from "../config";
import { ChapterVote } from "../render/ChapterVote";
import { ActionType, Category, SegmentContainer, SponsorHideType, SponsorSourceType, SponsorTime } from "../types";
import { ActionType, Category, CategorySkipOption, SegmentContainer, SponsorHideType, SponsorSourceType, SponsorTime } from "../types";
import { partition } from "../utils/arrayUtils";
import { DEFAULT_CATEGORY, shortCategoryName } from "../utils/categoryUtils";
import { normalizeChapterName } from "../utils/exporter";
@@ -14,6 +14,7 @@ import { addCleanupListener } from "../../maze-utils/src/cleanup";
import { hasAutogeneratedChapters, isVisible } from "../utils/pageUtils";
import { isVorapisInstalled } from "../utils/compatibility";
import { isOnYTTV } from "../../maze-utils/src/video";
import { getCategorySelection } from "../utils/skipRule";
const TOOLTIP_VISIBLE_CLASS = 'sponsorCategoryTooltipVisible';
const MIN_CHAPTER_SIZE = 0.003;
@@ -186,10 +187,6 @@ class PreviewBar {
// Hide original tooltip if some chapter has been filtered out
originalTooltip.style.display = "none";
noYoutubeChapters = true;
originalTooltip.classList.add("sponsorTooltipHasYTChapters");
} else {
originalTooltip.classList.remove("sponsorTooltipHasYTChapters");
}
if (mainSegment === null && secondarySegment === null) {
@@ -210,7 +207,6 @@ class PreviewBar {
const hasTwoTooltips = mainSegment !== null && secondarySegment !== null;
if (hasTwoTooltips) {
this.categoryTooltipContainer.classList.add("sponsorTwoTooltips");
originalTooltip.classList.remove("sponsorTooltipHasYTChapters");
} else {
this.categoryTooltipContainer.classList.remove("sponsorTwoTooltips");
}
@@ -894,7 +890,8 @@ class PreviewBar {
const activeSegments = segments.filter((segment) => {
return segment.hidden === SponsorHideType.Visible
&& segment.segment[0] <= currentTime && segment.segment[1] > currentTime
&& segment.category !== DEFAULT_CATEGORY;
&& segment.category !== DEFAULT_CATEGORY
&& getCategorySelection(segment).option !== CategorySkipOption.Disabled
});
this.setActiveSegments(activeSegments);

View File

@@ -6,6 +6,7 @@ import { asyncRequestToServer } from "../utils/requests";
import PencilIcon from "../svg-icons/pencilIcon";
import ClipboardIcon from "../svg-icons/clipboardIcon";
import CheckIcon from "../svg-icons/checkIcon";
import { showDonationLink } from "../utils/configUtils";
export const YourWorkComponent = () => {
const [isSettingUsername, setIsSettingUsername] = React.useState(false);
@@ -36,7 +37,7 @@ export const YourWorkComponent = () => {
Config.config!.permissions = userInfo.permissions;
setShowDonateMessage(Config.config.showDonationLink && Config.config.donateClicked <= 0 && Config.config.showPopupDonationCount < 5
&& viewCount < 50000 && !Config.config.isVip && Config.config.skipCount > 10);
&& viewCount < 50000 && !Config.config.isVip && Config.config.skipCount > 10 && showDonationLink());
}
})();
}, []);
@@ -167,7 +168,7 @@ function TimeSavedMessage({ viewCount, minutesSaved }: { viewCount: number; minu
<span className="sbExtraInfo">
{"("}{" "}
<b>
<span id="sponsorTimeSavedDisplay">{Config.config.minutesSaved}</span>{" "}
<span id="sponsorTimeSavedDisplay">{getFormattedHours(Config.config.minutesSaved)}</span>{" "}
<span id="sponsorTimeSavedEndWord">{Config.config.minutesSaved !== 1 ? chrome.i18n.getMessage("minsLower") : chrome.i18n.getMessage("minLower")}</span>{" "}
</b>
{")"}

View File

@@ -4,7 +4,7 @@ import * as Path from "path";
import * as fs from "fs";
test("Selenium Chrome test", async () => {
xtest("Selenium Chrome test", async () => {
let driver: WebDriver;
try {
driver = await setup();
@@ -12,6 +12,11 @@ test("Selenium Chrome test", async () => {
console.warn("A browser is probably not installed, skipping selenium tests");
console.warn(e);
if (String(e).includes("This version of ChromeDriver only supports")) {
// Count as failure
throw e;
}
return;
}
@@ -58,7 +63,7 @@ async function setup(): Promise<WebDriver> {
options.addArguments("--headless=new");
options.addArguments("--window-size=1920,1080");
const driver = await new Builder().forBrowser("chromium").setChromeOptions(options).build();
const driver = await new Builder().forBrowser("chrome").setChromeOptions(options).build();
driver.manage().setTimeouts({
implicit: 5000
});