-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Signed-off-by: Christopher Angelo <[email protected]>
- Loading branch information
1 parent
88db36c
commit 556a957
Showing
3 changed files
with
43 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
{ | ||
"json.schemas": [{ | ||
"fileMatch": [ | ||
"manifest.json" | ||
], | ||
"url": "https://json.schemastore.org/chrome-manifest" | ||
}] | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
const config = { | ||
userAgent: 'Mozilla/5.0 (SMART-TV; Linux; Tizen 5.0) AppleWebKit/538.1 (KHTML, like Gecko) Version/5.0 NativeTVAds Safari/538.1' | ||
} | ||
|
||
function changeUserAgent (request) { | ||
for (let header of request.requestHeaders) { | ||
if (header.name.toLowerCase() === "user-agent") header.value = config.userAgent | ||
} | ||
|
||
return { requestHeaders: request.requestHeaders } | ||
} | ||
|
||
chrome.webRequest.onBeforeSendHeaders.addListener(changeUserAgent, {urls: ["*://*.youtube.com/tv*"]}, ["blocking", "requestHeaders"]); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
{ | ||
"manifest_version": 2, | ||
|
||
"name": "YouTube TV for Browser", | ||
"description": "Enables YouTube TV for traditional browser", | ||
"version": "0.1", | ||
|
||
"permissions": [ | ||
"webRequest", | ||
"webRequestBlocking", | ||
"*://*.youtube.com/tv*" | ||
], | ||
|
||
"background": { | ||
"scripts": [ | ||
"background.js" | ||
] | ||
}, | ||
"browser_action": { | ||
"default_title": "YouTube TV for Browser" | ||
} | ||
} |