mirror of
https://github.com/ajayyy/SponsorBlock.git
synced 2025-12-18 05:28:32 +03:00
Compare commits
21 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
d1b2def47c | ||
|
|
48cdabe2a5 | ||
|
|
bc2db0cf2c | ||
|
|
843ef37dcd | ||
|
|
ed260a0667 | ||
|
|
2e131c2a95 | ||
|
|
f5e884b6aa | ||
|
|
a9929d0c93 | ||
|
|
3fb43d1c0e | ||
|
|
a1b2855538 | ||
|
|
07236baed5 | ||
|
|
f991435857 | ||
|
|
faa3259165 | ||
|
|
c96bafb6f7 | ||
|
|
9b7680f0e6 | ||
|
|
16e01b7494 | ||
|
|
6cd697dc32 | ||
|
|
9946bd1af2 | ||
|
|
3b06d72270 | ||
|
|
4bd0556464 | ||
|
|
edaed61612 |
@@ -1 +1 @@
|
||||
["www.youtubekids.com","inv.bp.projectsegfau.lt","inv.tux.pizza","inv.zzls.xyz","invidious.0011.lt","invidious.lunar.icu","invidious.privacydev.net","invidious.tiekoetter.com","iv.ggtyler.dev","iv.melmac.space","vid.priv.au","vid.puffyan.us","yewtu.be","yt.artemislena.eu"]
|
||||
["www.youtubekids.com","inv.bp.projectsegfau.lt","inv.citw.lgbt","inv.in.projectsegfau.lt","inv.makerlab.tech","inv.pistasjis.net","inv.tux.pizza","inv.zzls.xyz","invidious.0011.lt","invidious.io.lol","invidious.lunar.icu","invidious.no-logs.com","invidious.projectsegfau.lt","invidious.protokolla.fi","invidious.slipfox.xyz","invidious.tiekoetter.com","iv.ggtyler.dev","iv.melmac.space","iv.nboeck.de","onion.tube","vid.priv.au","vid.puffyan.us","yewtu.be","yt.artemislena.eu","yt.oelrichsgarcia.de"]
|
||||
@@ -1,6 +1,7 @@
|
||||
{
|
||||
"optional_permissions": [
|
||||
"declarativeContent"
|
||||
"declarativeContent",
|
||||
"webNavigation"
|
||||
],
|
||||
"background": {
|
||||
"persistent": false
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
{
|
||||
"name": "__MSG_fullName__",
|
||||
"short_name": "SponsorBlock",
|
||||
"version": "5.4.16",
|
||||
"version": "5.4.19",
|
||||
"default_locale": "en",
|
||||
"description": "__MSG_Description__",
|
||||
"homepage_url": "https://sponsor.ajay.app",
|
||||
@@ -84,8 +84,7 @@
|
||||
"https://sponsor.ajay.app/*"
|
||||
],
|
||||
"optional_permissions": [
|
||||
"*://*/*",
|
||||
"webNavigation"
|
||||
"*://*/*"
|
||||
],
|
||||
"browser_action": {
|
||||
"default_title": "SponsorBlock",
|
||||
|
||||
@@ -4,5 +4,8 @@
|
||||
},
|
||||
"permissions": [
|
||||
"scripting"
|
||||
],
|
||||
"optional_permissions": [
|
||||
"webNavigation"
|
||||
]
|
||||
}
|
||||
|
||||
Submodule maze-utils updated: 79bef97a3b...4f7384e03f
@@ -62,7 +62,7 @@
|
||||
"webext-content-scripts": {
|
||||
"ignore": false,
|
||||
"name": "webext-content-scripts",
|
||||
"version": "2.5.2",
|
||||
"version": "2.5.5",
|
||||
"authors": "Federico Brigante <me@fregante.com> (https://fregante.com)",
|
||||
"url": "https://github.com/fregante/webext-content-scripts",
|
||||
"license": "MIT",
|
||||
@@ -80,7 +80,7 @@
|
||||
"webext-polyfill-kinda": {
|
||||
"ignore": false,
|
||||
"name": "webext-polyfill-kinda",
|
||||
"version": "1.0.0",
|
||||
"version": "1.0.2",
|
||||
"authors": "Federico Brigante <me@fregante.com> (https://fregante.com)",
|
||||
"url": "https://github.com/fregante/webext-polyfill-kinda",
|
||||
"license": "MIT",
|
||||
|
||||
33
package-lock.json
generated
33
package-lock.json
generated
@@ -12961,12 +12961,15 @@
|
||||
}
|
||||
},
|
||||
"node_modules/webext-content-scripts": {
|
||||
"version": "2.5.2",
|
||||
"resolved": "https://registry.npmjs.org/webext-content-scripts/-/webext-content-scripts-2.5.2.tgz",
|
||||
"integrity": "sha512-N1Xq/E8dx0lVAOyPquuo+2Vj9Fx1GoqCFo79lWeJHbemaBJ53N3BHBmbJJYsQ8FOP1xiwN4bPRQY2dpSjHAD3Q==",
|
||||
"version": "2.5.5",
|
||||
"resolved": "https://registry.npmjs.org/webext-content-scripts/-/webext-content-scripts-2.5.5.tgz",
|
||||
"integrity": "sha512-CIq1LA/nHIXE43v8qlpqNPcbsSzGuQBkeykbqOWvKJ1Rx/q7zgdZsLgxwyoonWiQcJczslVmGWCfdBY04JwIyw==",
|
||||
"dependencies": {
|
||||
"webext-patterns": "^1.3.0",
|
||||
"webext-polyfill-kinda": "^1.0.0"
|
||||
"webext-polyfill-kinda": "^1.0.2"
|
||||
},
|
||||
"engines": {
|
||||
"node": ">=16"
|
||||
},
|
||||
"funding": {
|
||||
"url": "https://github.com/sponsors/fregante"
|
||||
@@ -12995,9 +12998,9 @@
|
||||
}
|
||||
},
|
||||
"node_modules/webext-polyfill-kinda": {
|
||||
"version": "1.0.0",
|
||||
"resolved": "https://registry.npmjs.org/webext-polyfill-kinda/-/webext-polyfill-kinda-1.0.0.tgz",
|
||||
"integrity": "sha512-Py/d3w/bC0KntuO60ePSWHsdrebZ3uYBLeFUjyPkDV3yTEQib0MRFvPh57t8XjImu4ylBoEAsFjzh/r22UtxMw==",
|
||||
"version": "1.0.2",
|
||||
"resolved": "https://registry.npmjs.org/webext-polyfill-kinda/-/webext-polyfill-kinda-1.0.2.tgz",
|
||||
"integrity": "sha512-rqQUKeBTOicej0tjDJWDQlOTnDcm9yYJTzgI+7rMdyYV4QHmYMRm+yjkcVgECkg/Wu9MboZ4lYeBPdp1Ep9WgQ==",
|
||||
"funding": {
|
||||
"url": "https://github.com/sponsors/fregante"
|
||||
}
|
||||
@@ -16739,7 +16742,7 @@
|
||||
"resolved": "https://registry.npmjs.org/content-scripts-register-polyfill/-/content-scripts-register-polyfill-4.0.2.tgz",
|
||||
"integrity": "sha512-8hDm+tu3BkxHZP7EUIIIo/495F6QNXF7cI9Lwr4PQaiohw2wWmi9k2SE4W4kNrAaLnFw6RZ2ev8EmrQb+sCoGQ==",
|
||||
"requires": {
|
||||
"webext-content-scripts": "^2.5.2",
|
||||
"webext-content-scripts": "v2.5.5",
|
||||
"webext-patterns": "^1.3.0",
|
||||
"webext-polyfill-kinda": "^1.0.0"
|
||||
}
|
||||
@@ -23096,12 +23099,12 @@
|
||||
"dev": true
|
||||
},
|
||||
"webext-content-scripts": {
|
||||
"version": "2.5.2",
|
||||
"resolved": "https://registry.npmjs.org/webext-content-scripts/-/webext-content-scripts-2.5.2.tgz",
|
||||
"integrity": "sha512-N1Xq/E8dx0lVAOyPquuo+2Vj9Fx1GoqCFo79lWeJHbemaBJ53N3BHBmbJJYsQ8FOP1xiwN4bPRQY2dpSjHAD3Q==",
|
||||
"version": "2.5.5",
|
||||
"resolved": "https://registry.npmjs.org/webext-content-scripts/-/webext-content-scripts-2.5.5.tgz",
|
||||
"integrity": "sha512-CIq1LA/nHIXE43v8qlpqNPcbsSzGuQBkeykbqOWvKJ1Rx/q7zgdZsLgxwyoonWiQcJczslVmGWCfdBY04JwIyw==",
|
||||
"requires": {
|
||||
"webext-patterns": "^1.3.0",
|
||||
"webext-polyfill-kinda": "^1.0.0"
|
||||
"webext-polyfill-kinda": "^1.0.2"
|
||||
}
|
||||
},
|
||||
"webext-patterns": {
|
||||
@@ -23120,9 +23123,9 @@
|
||||
}
|
||||
},
|
||||
"webext-polyfill-kinda": {
|
||||
"version": "1.0.0",
|
||||
"resolved": "https://registry.npmjs.org/webext-polyfill-kinda/-/webext-polyfill-kinda-1.0.0.tgz",
|
||||
"integrity": "sha512-Py/d3w/bC0KntuO60ePSWHsdrebZ3uYBLeFUjyPkDV3yTEQib0MRFvPh57t8XjImu4ylBoEAsFjzh/r22UtxMw=="
|
||||
"version": "1.0.2",
|
||||
"resolved": "https://registry.npmjs.org/webext-polyfill-kinda/-/webext-polyfill-kinda-1.0.2.tgz",
|
||||
"integrity": "sha512-rqQUKeBTOicej0tjDJWDQlOTnDcm9yYJTzgI+7rMdyYV4QHmYMRm+yjkcVgECkg/Wu9MboZ4lYeBPdp1Ep9WgQ=="
|
||||
},
|
||||
"webidl-conversions": {
|
||||
"version": "7.0.0",
|
||||
|
||||
@@ -8,6 +8,11 @@
|
||||
"react": "^18.2.0",
|
||||
"react-dom": "^18.2.0"
|
||||
},
|
||||
"overrides": {
|
||||
"content-scripts-register-polyfill": {
|
||||
"webext-content-scripts": "v2.5.5"
|
||||
}
|
||||
},
|
||||
"devDependencies": {
|
||||
"@types/chrome": "^0.0.220",
|
||||
"@types/firefox-webext-browser": "^111.0.0",
|
||||
|
||||
Submodule public/_locales updated: 5528978f2f...0a46f4ec38
@@ -164,7 +164,7 @@ SOFTWARE.
|
||||
******************************
|
||||
|
||||
webext-content-scripts
|
||||
2.5.2 <https://github.com/fregante/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)
|
||||
@@ -194,7 +194,7 @@ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLI
|
||||
******************************
|
||||
|
||||
webext-polyfill-kinda
|
||||
1.0.0 <https://github.com/fregante/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)
|
||||
|
||||
@@ -155,18 +155,9 @@ chrome.runtime.onInstalled.addListener(function () {
|
||||
*/
|
||||
async function registerFirefoxContentScript(options: Registration) {
|
||||
if ("scripting" in chrome && "getRegisteredContentScripts" in chrome.scripting) {
|
||||
// Bug in Firefox where you need to use browser namespace for this call
|
||||
const getContentScripts = async (filter: browser.scripting.ContentScriptFilter) => {
|
||||
if (isFirefoxOrSafari()) {
|
||||
return await browser.scripting.getRegisteredContentScripts(filter);
|
||||
} else {
|
||||
return await chrome.scripting.getRegisteredContentScripts(filter);
|
||||
}
|
||||
};
|
||||
|
||||
const existingRegistrations = await getContentScripts({
|
||||
const existingRegistrations = await chromeP.scripting.getRegisteredContentScripts({
|
||||
ids: [options.id]
|
||||
});
|
||||
}).catch(() => []);
|
||||
|
||||
if (existingRegistrations.length > 0
|
||||
&& existingRegistrations[0].matches.every((match) => options.matches.includes(match))) {
|
||||
@@ -204,9 +195,13 @@ async function registerFirefoxContentScript(options: Registration) {
|
||||
*/
|
||||
async function unregisterFirefoxContentScript(id: string) {
|
||||
if ("scripting" in chrome && "getRegisteredContentScripts" in chrome.scripting) {
|
||||
await chromeP.scripting.unregisterContentScripts({
|
||||
ids: [id]
|
||||
});
|
||||
try {
|
||||
await chromeP.scripting.unregisterContentScripts({
|
||||
ids: [id]
|
||||
});
|
||||
} catch (e) {
|
||||
// Not registered yet
|
||||
}
|
||||
} else {
|
||||
if (contentScriptRegistrations[id]) {
|
||||
contentScriptRegistrations[id].unregister();
|
||||
|
||||
@@ -138,6 +138,8 @@ class SponsorTimeEditComponent extends React.Component<SponsorTimeEditProps, Spo
|
||||
type="text"
|
||||
style={{color: "inherit", backgroundColor: "inherit"}}
|
||||
value={this.state.sponsorTimeEdits[0]}
|
||||
onKeyDown={(e) => e.stopPropagation()}
|
||||
onKeyUp={(e) => e.stopPropagation()}
|
||||
onChange={(e) => this.handleOnChange(0, e, sponsorTime, e.target.value)}
|
||||
onWheel={(e) => this.changeTimesWhenScrolling(0, e, sponsorTime)}>
|
||||
</input>
|
||||
|
||||
@@ -63,7 +63,7 @@ utils.wait(() => Config.isReady(), 5000, 10).then(() => {
|
||||
&& Config.config.showDeArrowPromotion
|
||||
&& Config.config.showUpsells
|
||||
&& Config.config.showNewFeaturePopups
|
||||
&& (Config.config.skipCount > 100 || !Config.config.trackViewCount)
|
||||
&& (Config.config.skipCount > 30 || !Config.config.trackViewCount)
|
||||
&& Math.random() < 0.05) {
|
||||
|
||||
if (!await isDeArrowInstalled()) {
|
||||
|
||||
@@ -4,20 +4,17 @@ function getLuminance(color: string): number {
|
||||
return Math.sqrt(0.299 * (r * r) + 0.587 * (g * g) + 0.114 * (b * b));
|
||||
}
|
||||
|
||||
/* From https://stackoverflow.com/a/5624139 */
|
||||
function hexToRgb(hex: string): {r: number; g: number; b: number} {
|
||||
// Expand shorthand form (e.g. "03F") to full form (e.g. "0033FF")
|
||||
const shorthandRegex = /^#?([a-f\d])([a-f\d])([a-f\d])$/i;
|
||||
hex = hex.replace(shorthandRegex, function(m, r, g, b) {
|
||||
return r + r + g + g + b + b;
|
||||
});
|
||||
|
||||
const result = /^#?([a-f\d]{2})([a-f\d]{2})([a-f\d]{2})$/i.exec(hex);
|
||||
return result ? {
|
||||
r: parseInt(result[1], 16),
|
||||
g: parseInt(result[2], 16),
|
||||
b: parseInt(result[3], 16)
|
||||
} : null;
|
||||
/* Converts hex color to rgb color */
|
||||
const hexChars = "0123456789abcdef";
|
||||
function hexToRgb(hex: string): { r: number; g: number; b: number } | null {
|
||||
if (hex.length == 4)
|
||||
hex = "#" + hex[1] + hex[1] + hex[2] + hex[2] + hex[3] + hex[3];
|
||||
return /^#?([a-f\d]{2})([a-f\d]{2})([a-f\d]{2})$/i.exec(hex)
|
||||
? {
|
||||
r: hexChars.indexOf(hex[1]) * 16 + hexChars.indexOf(hex[2]),
|
||||
g: hexChars.indexOf(hex[3]) * 16 + hexChars.indexOf(hex[4]),
|
||||
b: hexChars.indexOf(hex[5]) * 16 + hexChars.indexOf(hex[6]),
|
||||
}: null;
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -31,4 +28,4 @@ function indexesOf<T>(array: T[], value: T): number[] {
|
||||
export const GenericUtils = {
|
||||
getLuminance,
|
||||
indexesOf
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user