Skip to content

Commit

Permalink
account and studio youtube fix
Browse files Browse the repository at this point in the history
  • Loading branch information
KImi no waw wa committed Jan 21, 2024
1 parent a8f0b09 commit ca9d4b8
Show file tree
Hide file tree
Showing 2 changed files with 32 additions and 6 deletions.
19 changes: 16 additions & 3 deletions firefox-src/background.js
Original file line number Diff line number Diff line change
Expand Up @@ -427,9 +427,22 @@ function updateRules(parameterRedirectServices, customInstances) {
}

if (parameterRedirectServices.youtube) {
redirectRules.push(
createRedirectRule(1, "youtube.com", randYoutubeInstance)
);
redirectRules.push({
id: 1,
priority: 1,
condition: {
urlFilter: "||youtube.com",
resourceTypes: ["main_frame"],
excludedInitiatorDomains: [randYoutubeInstance],
excludedRequestDomains: ["accounts.youtube.com", "studio.youtube.com"],
},
action: {
type: "redirect",
redirect: {
transform: { scheme: "https", host: randYoutubeInstance },
},
},
});
redirectRules.push({
id: 2,
priority: 1,
Expand Down
19 changes: 16 additions & 3 deletions src/background.js
Original file line number Diff line number Diff line change
Expand Up @@ -428,9 +428,22 @@ function updateRules(parameterRedirectServices, customInstances) {
}

if (parameterRedirectServices.youtube) {
redirectRules.push(
createRedirectRule(1, "youtube.com", randYoutubeInstance)
);
redirectRules.push({
id: 1,
priority: 1,
condition: {
urlFilter: "||youtube.com",
resourceTypes: ["main_frame"],
excludedInitiatorDomains: [randYoutubeInstance],
excludedRequestDomains: ["accounts.youtube.com", "studio.youtube.com"],
},
action: {
type: "redirect",
redirect: {
transform: { scheme: "https", host: randYoutubeInstance },
},
},
});
redirectRules.push({
id: 2,
priority: 1,
Expand Down

0 comments on commit ca9d4b8

Please sign in to comment.