aboutsummaryrefslogtreecommitdiffhomepage
path: root/webpack
diff options
context:
space:
mode:
authorAjay <[email protected]>2023-02-01 19:48:24 -0500
committerAjay <[email protected]>2023-02-01 19:48:24 -0500
commitc3213eb040dd6dd0e891145ec6a2364bd19d4345 (patch)
treea97e14f65e6e1dd031f69e9c64faed3a5acda39e /webpack
parent78a006544a91a6d49f44a3d8cfa751531c456a50 (diff)
downloadSponsorBlock-c3213eb040dd6dd0e891145ec6a2364bd19d4345.tar.gz
SponsorBlock-c3213eb040dd6dd0e891145ec6a2364bd19d4345.zip
Add invidious instances by default for safari
https://github.com/ajayyy/SponsorBlock/issues/798
Diffstat (limited to 'webpack')
-rw-r--r--webpack/webpack.manifest.js6
1 files changed, 6 insertions, 0 deletions
diff --git a/webpack/webpack.manifest.js b/webpack/webpack.manifest.js
index 3e30ffc6..ebd4d967 100644
--- a/webpack/webpack.manifest.js
+++ b/webpack/webpack.manifest.js
@@ -3,6 +3,7 @@
const webpack = require("webpack");
const path = require('path');
const { validate } = require('schema-utils');
+const invidiousList = require("../ci/invidiouslist.json");
const fs = require('fs');
@@ -49,6 +50,11 @@ class BuildManifest {
mergeObjects(manifest, chromeManifestExtra);
} else if (this.options.browser.toLowerCase() === "safari") {
mergeObjects(manifest, safariManifestExtra);
+
+ // Add all invidious instances as options for the content script
+ for (const instance of invidiousList) {
+ manifest.content_scripts[0].matches.push(`*://*.${instance}/*`);
+ }
}
if (this.options.stream === "beta") {