Compare commits

...

9 Commits
5.12 ... 5.12.1

Author SHA1 Message Date
Ajay
19635d2f06 bump version 2025-04-25 02:13:56 -04:00
Ajay
b2a5539324 Another fix for button placement on new YouTube layout 2025-04-25 02:13:33 -04:00
Ajay
01df1e655e Fix commit hash for setup chrome workflow 2025-04-24 15:53:39 -04:00
Ajay
467e1cae50 Install specific version of chrome for testing 2025-04-24 15:20:59 -04:00
Ajay
822e00a46a Change wireguard connection action 2025-04-24 03:37:13 -04:00
Ajay
74433fe751 Use VPN for testing action 2025-04-24 03:27:30 -04:00
Ajay
a45690b26e Use self-hosted runner 2025-04-24 03:08:33 -04:00
Ajay
f69d6736d4 Add more delay to make tests work 2025-04-24 02:55:52 -04:00
Ajay
ae7916b7e7 Fix behavior or auto skip on music videos with when only skipping on music.youtube.com enabled 2025-04-24 02:03:08 -04:00
5 changed files with 20 additions and 5 deletions

View File

@@ -17,9 +17,21 @@ jobs:
node-version: '18' node-version: '18'
- run: npm ci - run: npm ci
- run: sudo apt-get install chromium-chromedriver - run: sudo apt-get install chromium-chromedriver
- uses: browser-actions/setup-chrome@c785b87e244131f27c9f19c1a33e2ead956ab7ce
with:
chrome-version: 135
install-dependencies: true
install-chromedriver: true
- name: Copy configuration - name: Copy configuration
run: cp config.json.example config.json 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

View File

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

View File

@@ -1926,13 +1926,14 @@ function createButton(baseID: string, title: string, callback: () => void, image
} }
function shouldAutoSkip(segment: SponsorTime): boolean { function shouldAutoSkip(segment: SponsorTime): boolean {
if (segment.category === "music_offtopic" && Config.config.skipNonMusicOnlyOnYoutubeMusic && !isOnYouTubeMusic()) { const canSkipNonMusic = !Config.config.skipNonMusicOnlyOnYoutubeMusic || isOnYouTubeMusic();
if (segment.category === "music_offtopic" && !canSkipNonMusic) {
return false; return false;
} }
return (!Config.config.manualSkipOnFullVideo || !sponsorTimes?.some((s) => s.category === segment.category && s.actionType === ActionType.Full)) return (!Config.config.manualSkipOnFullVideo || !sponsorTimes?.some((s) => s.category === segment.category && s.actionType === ActionType.Full))
&& (utils.getCategorySelection(segment.category)?.option === CategorySkipOption.AutoSkip || && (utils.getCategorySelection(segment.category)?.option === CategorySkipOption.AutoSkip ||
(Config.config.autoSkipOnMusicVideos && sponsorTimes?.some((s) => s.category === "music_offtopic") (Config.config.autoSkipOnMusicVideos && canSkipNonMusic && sponsorTimes?.some((s) => s.category === "music_offtopic")
&& segment.actionType === ActionType.Skip) && segment.actionType === ActionType.Skip)
|| sponsorTimesSubmitting.some((s) => s.segment === segment.segment)) || sponsorTimesSubmitting.some((s) => s.segment === segment.segment))
|| isLoopedChapter(segment); || isLoopedChapter(segment);

View File

@@ -4,10 +4,10 @@ import Config from "../config";
export function getControls(): HTMLElement { export function getControls(): HTMLElement {
const controlsSelectors = [ const controlsSelectors = [
// YouTube
".ytp-right-controls",
// New YouTube (2025 April) // New YouTube (2025 April)
".ytp-right-controls-right", ".ytp-right-controls-right",
// YouTube
".ytp-right-controls",
// Mobile YouTube // Mobile YouTube
".player-controls-top", ".player-controls-top",
// Invidious/videojs video element's controls element // Invidious/videojs video element's controls element

View File

@@ -127,6 +127,8 @@ async function editSegments(driver: WebDriver, index: number, expectedStartTimeB
await endTimeBox.clear(); await endTimeBox.clear();
await endTimeBox.sendKeys(endTime); await endTimeBox.sendKeys(endTime);
await driver.sleep(1000);
editButton = await driver.findElement(By.id("sponsorTimeEditButtonSubmissionNotice" + index)); editButton = await driver.findElement(By.id("sponsorTimeEditButtonSubmissionNotice" + index));
await editButton.click(); await editButton.click();