aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorAjay <[email protected]>2023-07-11 17:05:08 -0400
committerAjay <[email protected]>2023-07-11 17:05:08 -0400
commit3175d7f8e980cbd86c62bd303c18750139b573b4 (patch)
tree0f9959527c5a176149a1da9ad05d565619bade6f
parentab4035bbc59c3d4b5027072350738fe4c2895859 (diff)
downloadSponsorBlock-3175d7f8e980cbd86c62bd303c18750139b573b4.tar.gz
SponsorBlock-3175d7f8e980cbd86c62bd303c18750139b573b4.zip
remove port from invidious domain as it is not needed
-rw-r--r--src/options.ts7
-rw-r--r--src/utils.ts2
2 files changed, 6 insertions, 3 deletions
diff --git a/src/options.ts b/src/options.ts
index 71ed6339..039d7d7e 100644
--- a/src/options.ts
+++ b/src/options.ts
@@ -445,7 +445,12 @@ function invidiousInstanceAddInit(element: HTMLElement, option: string) {
let instanceList = Config.config[option];
if (!instanceList) instanceList = [];
- instanceList.push(textBox.value.trim().toLowerCase());
+ let domain = textBox.value.trim().toLowerCase();
+ if (domain.includes(":")) {
+ domain = domain.split(":")[0];
+ }
+
+ instanceList.push(domain);
Config.config[option] = instanceList;
diff --git a/src/utils.ts b/src/utils.ts
index 8e405543..cbe4e589 100644
--- a/src/utils.ts
+++ b/src/utils.ts
@@ -240,8 +240,6 @@ export default class Utils {
for (const url of domains) {
permissionRegex.push("https://*." + url + "/*");
permissionRegex.push("http://*." + url + "/*");
- permissionRegex.push("https://" + url + "/*");
- permissionRegex.push("http://" + url + "/*");
}
return permissionRegex;