-
-
Notifications
You must be signed in to change notification settings - Fork 84
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Browse files
Browse the repository at this point in the history
… support.
- Loading branch information
1 parent
5b67616
commit 5a03277
Showing
5 changed files
with
45 additions
and
33 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
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 |
---|---|---|
@@ -1,10 +1,19 @@ | ||
{ | ||
"id": "com.youtube.noads", | ||
"id": "youtube.leanback.v4", | ||
"version": "0.0.1", | ||
"vendor": "My Company", | ||
"type": "web", | ||
"main": "index.html", | ||
"title": "Youtube Without ADs", | ||
"icon": "icon.png", | ||
"largeIcon": "largeIcon.png" | ||
"largeIcon": "largeIcon.png", | ||
"support360Content": true, | ||
"accessibility": { | ||
"supportsAudioGuidance": true | ||
}, | ||
"privilegedJail": true, | ||
"supportQuickStart": true, | ||
"dialAppName": "YouTube", | ||
"disableBackHistoryAPI": true, | ||
"noSplashOnLaunch": true | ||
} |
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
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,28 @@ | ||
const CONTENT_TARGET_LAUNCH_PARAMETER = "contentTarget"; | ||
const YOUTUBE_TV_URL = "https://www.youtube.com/tv"; | ||
|
||
function extractLaunchUrlParams(launchParameters) { | ||
if (launchParameters === null || launchParameters === "") { | ||
return null; | ||
} | ||
const launchParamJson = JSON.parse(launchParameters); | ||
return launchParamJson[CONTENT_TARGET_LAUNCH_PARAMETER]; | ||
} | ||
|
||
function concatenateUrlAndGetParams(ytUrl, path) { | ||
if (path === null) { | ||
return ytUrl; | ||
} else { | ||
return ytUrl + "?" + path; | ||
} | ||
} | ||
|
||
function main() { | ||
const launchParameters = window.PalmSystem.launchParams; | ||
const youtubeLaunchUrlPath = extractLaunchUrlParams(launchParameters); | ||
|
||
window.location = concatenateUrlAndGetParams(YOUTUBE_TV_URL, youtubeLaunchUrlPath); | ||
} | ||
|
||
|
||
main(); |
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