Skip to content

Conversation

@Daksh777
Copy link
Contributor

This PR fixes a bug that was preventing the SponsorBlock plugin from working (#4046)

The problem was in our custom IPC wrapper for renderer plugins. It was accidentally stripping out the event object from incoming messages, which caused the actual data (like the skip segments for SponsorBlock) to get mixed up.

I've adjusted the wrapper to make sure it passes along all the arguments correctly. This gets SponsorBlock working again and makes our plugin system a bit more reliable for the future.

@@ -1,4 +1,5 @@
import is from 'electron-is';
import { IpcRendererEvent } from 'electron';
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ [eslint] <@typescript-eslint/no-unused-vars> reported by reviewdog 🐶
'IpcRendererEvent' is defined but never used.

const video = document.querySelector<HTMLVideoElement>('video');
if (!video) return;

const adContainer = document.querySelector('.ytp-ad-player-overlay, .video-ads, .ytp-ad-module');
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🚫 [eslint] <prettier/prettier> reported by reviewdog 🐶
Replace '.ytp-ad-player-overlay,·.video-ads,·.ytp-ad-module' with ⏎····'.ytp-ad-player-overlay,·.video-ads,·.ytp-ad-module',⏎··

Suggested change
const adContainer = document.querySelector('.ytp-ad-player-overlay, .video-ads, .ytp-ad-module');
const adContainer = document.querySelector(
'.ytp-ad-player-overlay, .video-ads, .ytp-ad-module',
);


const adContainer = document.querySelector('.ytp-ad-player-overlay, .video-ads, .ytp-ad-module');
const adText = document.querySelector('.ytp-ad-text, .ytp-ad-preview-text');

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🚫 [eslint] <prettier/prettier> reported by reviewdog 🐶
Delete ··

Suggested change

const adText = document.querySelector('.ytp-ad-text, .ytp-ad-preview-text');

// Check if ad is playing
const isAd = adContainer || adText ||
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🚫 [eslint] <prettier/prettier> reported by reviewdog 🐶
Replace ·adContainer·||·adText·||· with ⏎····adContainer·||⏎····adText·||

Suggested change
const isAd = adContainer || adText ||
const isAd =
adContainer ||
adText ||


// Check if ad is playing
const isAd = adContainer || adText ||
document.querySelector('.ad-showing') ||
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🚫 [eslint] <prettier/prettier> reported by reviewdog 🐶
Delete ···········

Suggested change
document.querySelector('.ad-showing') ||
document.querySelector('.ad-showing') ||

// Check if ad is playing
const isAd = adContainer || adText ||
document.querySelector('.ad-showing') ||
document.querySelector('.advertisement');
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🚫 [eslint] <prettier/prettier> reported by reviewdog 🐶
Delete ···········

Suggested change
document.querySelector('.advertisement');
document.querySelector('.advertisement');


// Try to click skip button if available
const skipButton = document.querySelector<HTMLElement>(
'.ytp-ad-skip-button, .ytp-ad-skip-button-modern, button.ytp-ad-skip-button'
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🚫 [eslint] <prettier/prettier> reported by reviewdog 🐶
Insert ,

Suggested change
'.ytp-ad-skip-button, .ytp-ad-skip-button-modern, button.ytp-ad-skip-button'
'.ytp-ad-skip-button, .ytp-ad-skip-button-modern, button.ytp-ad-skip-button',

Comment on lines +43 to +46
blocker = await ElectronBlocker.fromLists(
fetch,
blockLists,
{
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🚫 [eslint] <prettier/prettier> reported by reviewdog 🐶
Replace ⏎··········fetch,⏎··········blockLists,⏎········· with fetch,·blockLists,

Suggested change
blocker = await ElectronBlocker.fromLists(
fetch,
blockLists,
{
blocker = await ElectronBlocker.fromLists(fetch, blockLists, {

fetch,
blockLists,
{
enableCompression: true,
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🚫 [eslint] <prettier/prettier> reported by reviewdog 🐶
Delete ··

Suggested change
enableCompression: true,
enableCompression: true,

Comment on lines +48 to +49
},
);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🚫 [eslint] <prettier/prettier> reported by reviewdog 🐶
Replace ··},⏎········ with }

Suggested change
},
);
});

}
},

async onConfigChange(newConfig: AdBlockerPluginConfig) {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🚫 [eslint] <@typescript-eslint/require-await> reported by reviewdog 🐶
Async method 'onConfigChange' has no 'await' expression.

Copilot AI and others added 4 commits November 10, 2025 05:36
Added SimpMusic Lyrics provider to fetch and display lyrics for supported tracks from the SimpMusic Lyrics API. This improves lyrics coverage, especially for non-English songs.

Co-authored-by: Daksh777 <[email protected]>
…ider

Add SimpMusic Lyrics provider integration
@@ -0,0 +1,138 @@
import { jaroWinkler } from '@skyra/jaro-winkler';

import { config } from '../renderer/renderer';
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ [eslint] <@typescript-eslint/no-unused-vars> reported by reviewdog 🐶
'config' is defined but never used.

Copilot AI and others added 3 commits November 10, 2025 06:20
@Daksh777 Daksh777 closed this Nov 10, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant