├── .prettierignore ├── src ├── hooks │ ├── index.ts │ └── fetch.ts ├── icons │ ├── IconSponsorBlocker64px.png │ └── PlayerInfoIconSponsorBlocker.svg ├── index.html ├── index.js ├── block-webos-cast.ts ├── yt-fixes.css ├── userScript.js ├── font-fix.css ├── webos-utils.js ├── custom-event-target.ts ├── domrect-polyfill.js ├── screensaver-fix.ts ├── video-quality.js ├── yt-fixes.js ├── auto-login.js ├── thumbnail-quality.ts ├── utils.js ├── config.js ├── Sponsorblock-UI.js ├── adblock.js ├── ui.css ├── return-dislike.js └── sponsorblock.js ├── .gitignore ├── .github ├── FUNDING.yml ├── workflows │ ├── main.yml │ ├── release.yml │ └── build_repo.yml └── ISSUE_TEMPLATE │ └── bug.md ├── assets ├── icon.png ├── largeIcon.png ├── appinfo.json └── icon.svg ├── screenshots ├── 1_sm.jpg ├── 2_sm.jpg ├── 1_sm_new.png ├── 2_sm_new.png ├── webOS_TV_24_Simulator_GEgUgGmuir.png └── webOS_TV_24_Simulator_mKe8Gv7zXq.png ├── .editorconfig ├── .vscode ├── extensions.json └── settings.json ├── postcss.config.ts ├── tsconfig.json ├── .browserslistrc ├── lint-staged.config.js ├── .prettierrc.js ├── .gitattributes ├── tools ├── sync-version.cjs ├── deploy.js └── gen-manifest.cjs ├── tsconfig.tooling.json ├── tsconfig.base.json ├── repo.json ├── babel.config.js ├── package.json ├── eslint.config.ts ├── webpack.config.js ├── README.md └── CHANGELOG.md /.prettierignore: -------------------------------------------------------------------------------- 1 | dist 2 | *-polyfill.* 3 | -------------------------------------------------------------------------------- /src/hooks/index.ts: -------------------------------------------------------------------------------- 1 | export * from './fetch'; 2 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | *.ipk 2 | /node_modules/ 3 | /dist/ 4 | .DS_Store 5 | /.vscode/ 6 | -------------------------------------------------------------------------------- /.github/FUNDING.yml: -------------------------------------------------------------------------------- 1 | github: [informatic, throwaway96] 2 | ko_fi: throwaway96 3 | -------------------------------------------------------------------------------- /assets/icon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/NicholasBly/youtube-webos/HEAD/assets/icon.png -------------------------------------------------------------------------------- /assets/largeIcon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/NicholasBly/youtube-webos/HEAD/assets/largeIcon.png -------------------------------------------------------------------------------- /screenshots/1_sm.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/NicholasBly/youtube-webos/HEAD/screenshots/1_sm.jpg -------------------------------------------------------------------------------- /screenshots/2_sm.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/NicholasBly/youtube-webos/HEAD/screenshots/2_sm.jpg -------------------------------------------------------------------------------- /screenshots/1_sm_new.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/NicholasBly/youtube-webos/HEAD/screenshots/1_sm_new.png -------------------------------------------------------------------------------- /screenshots/2_sm_new.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/NicholasBly/youtube-webos/HEAD/screenshots/2_sm_new.png -------------------------------------------------------------------------------- /src/icons/IconSponsorBlocker64px.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/NicholasBly/youtube-webos/HEAD/src/icons/IconSponsorBlocker64px.png -------------------------------------------------------------------------------- /src/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | -------------------------------------------------------------------------------- /.editorconfig: -------------------------------------------------------------------------------- 1 | # top-most EditorConfig file 2 | root = true 3 | 4 | [*] 5 | indent_style = space 6 | indent_size = 2 7 | insert_final_newline = true 8 | -------------------------------------------------------------------------------- /screenshots/webOS_TV_24_Simulator_GEgUgGmuir.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/NicholasBly/youtube-webos/HEAD/screenshots/webOS_TV_24_Simulator_GEgUgGmuir.png -------------------------------------------------------------------------------- /screenshots/webOS_TV_24_Simulator_mKe8Gv7zXq.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/NicholasBly/youtube-webos/HEAD/screenshots/webOS_TV_24_Simulator_mKe8Gv7zXq.png -------------------------------------------------------------------------------- /src/index.js: -------------------------------------------------------------------------------- 1 | import { extractLaunchParams, handleLaunch } from './utils'; 2 | 3 | function main() { 4 | handleLaunch(extractLaunchParams()); 5 | } 6 | 7 | main(); -------------------------------------------------------------------------------- /.vscode/extensions.json: -------------------------------------------------------------------------------- 1 | { 2 | "recommendations": [ 3 | "editorconfig.editorconfig", 4 | "esbenp.prettier-vscode", 5 | "dbaeumer.vscode-eslint" 6 | ] 7 | } 8 | -------------------------------------------------------------------------------- /postcss.config.ts: -------------------------------------------------------------------------------- 1 | import type { Config } from 'postcss-load-config'; 2 | 3 | const config: Config = { 4 | plugins: { 5 | 'postcss-preset-env': {} 6 | } 7 | }; 8 | 9 | export default config; 10 | -------------------------------------------------------------------------------- /tsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "extends": "./tsconfig.base.json", 3 | "compilerOptions": { 4 | "allowJs": true, 5 | 6 | "lib": ["ESNext", "DOM"] 7 | }, 8 | "include": ["./src"], 9 | "references": [{ "path": "./tsconfig.tooling.json" }] 10 | } 11 | -------------------------------------------------------------------------------- /.vscode/settings.json: -------------------------------------------------------------------------------- 1 | { 2 | "javascript.preferences.quoteStyle": "single", 3 | "prettier.requireConfig": true, 4 | "prettier.useEditorConfig": true, 5 | "editor.formatOnSave": true, 6 | "prettier.ignorePath": ".prettierignore", 7 | "typescript.tsdk": "node_modules\\typescript\\lib" 8 | } 9 | -------------------------------------------------------------------------------- /.browserslistrc: -------------------------------------------------------------------------------- 1 | # WAM uses WebKit on webOS 1 and 2 2 | safari 7 # [WebKit 537.71] for webOS 1 [WebKit 537.41] 3 | safari 8 # [WebKit 538.35] for webOS 2 [WebKit 538.2] 4 | chrome 38 # webOS 3.x 5 | chrome 53 # webOS 4.x 6 | chrome 68 # webOS 5 7 | chrome 79 # webOS 6 8 | chrome 87 # webOS 7 (22) 9 | chrome 94 # webOS 8 (23) 10 | chrome 108 # webOS 9 (24) 11 | -------------------------------------------------------------------------------- /lint-staged.config.js: -------------------------------------------------------------------------------- 1 | function globForCode(/** @type {string} */ toolName) { 2 | return '*.?(c|m){js,ts}?(x)' + `*(${toolName})`; 3 | } 4 | 5 | /** @type {import('lint-staged').Configuration} */ 6 | export default { 7 | '*': 'prettier --ignore-unknown --write', 8 | [globForCode('eslint')]: 'eslint', 9 | [globForCode('tsc')]: () => 'tsc -b' 10 | }; 11 | -------------------------------------------------------------------------------- /.prettierrc.js: -------------------------------------------------------------------------------- 1 | /** @type {import('prettier').Config} */ 2 | const config = { 3 | trailingComma: 'none', 4 | singleQuote: true, 5 | endOfLine: 'auto', 6 | overrides: [ 7 | { 8 | files: ['tsconfig.json', 'jsconfig.json', 'tsconfig.*.json'], 9 | options: { 10 | parser: 'jsonc' 11 | } 12 | } 13 | ] 14 | }; 15 | 16 | export default config; 17 | -------------------------------------------------------------------------------- /.gitattributes: -------------------------------------------------------------------------------- 1 | * text=auto 2 | 3 | *.css text 4 | *.html text 5 | *.js text 6 | *.json text 7 | *.md text 8 | *.mjs text 9 | *.svg text 10 | *.yml text 11 | 12 | .browserslistrc text 13 | .editorconfig text 14 | .eslintignore text 15 | .gitattributes text 16 | .gitignore text 17 | .prettierignore text 18 | LICENSE text 19 | 20 | *.sh text eol=lf 21 | 22 | *.jpg binary 23 | *.png binary 24 | -------------------------------------------------------------------------------- /tools/sync-version.cjs: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env node 2 | 3 | const fs = require('fs'); 4 | 5 | const packageInfo = require('../package.json'); 6 | const appinfo = require('../assets/appinfo.json'); 7 | 8 | fs.writeFileSync( 9 | 'assets/appinfo.json', 10 | `${JSON.stringify( 11 | { 12 | ...appinfo, 13 | version: packageInfo.version 14 | }, 15 | null, 16 | 2 17 | )}\n` 18 | ); 19 | -------------------------------------------------------------------------------- /tools/deploy.js: -------------------------------------------------------------------------------- 1 | import { spawnSync } from 'node:child_process'; 2 | import { normalize } from 'node:path'; 3 | 4 | process.exit( 5 | spawnSync( 6 | normalize('./node_modules/.bin/ares-install'), 7 | [ 8 | normalize( 9 | `./youtube.leanback.v4_${process.env.npm_package_version}_all.ipk` 10 | ) 11 | ], 12 | { stdio: 'inherit', shell: true } 13 | ).status ?? 0 14 | ); 15 | -------------------------------------------------------------------------------- /src/block-webos-cast.ts: -------------------------------------------------------------------------------- 1 | /** 2 | * Fixes webosbrew/youtube-webos/issues/343 3 | */ 4 | 5 | import { FetchRegistry } from './hooks'; 6 | 7 | export function initBlockWebOSCast() { 8 | console.info('[Block WebOS Cast] Initialized'); 9 | 10 | FetchRegistry.getInstance().addEventListener('request', (evt) => { 11 | const { url, resource, init } = evt.detail; 12 | if (url.pathname === '/wake_cast_core') evt.preventDefault(); 13 | }); 14 | } -------------------------------------------------------------------------------- /tsconfig.tooling.json: -------------------------------------------------------------------------------- 1 | { 2 | "extends": "./tsconfig.base.json", 3 | "compilerOptions": { 4 | "checkJs": true, 5 | 6 | // Remove when webpack-contrib/copy-webpack-plugin/issues/793 is fixed. 7 | "skipLibCheck": true, 8 | 9 | "module": "NodeNext", 10 | 11 | "moduleResolution": "NodeNext" 12 | }, 13 | "include": [ 14 | "./tools", 15 | "./assets/appinfo.json", 16 | "./package.json", 17 | "./webpack.config.js", 18 | "eslint.config.ts", 19 | "babel.config.js", 20 | ".prettierrc.js", 21 | "lint-staged.config.js", 22 | "postcss.config.ts" 23 | ] 24 | } 25 | -------------------------------------------------------------------------------- /tsconfig.base.json: -------------------------------------------------------------------------------- 1 | { 2 | "compilerOptions": { 3 | // Language 4 | "target": "ESNext", 5 | "module": "ESNext", 6 | "lib": ["ESNext"], 7 | "esModuleInterop": true, 8 | 9 | // Module handling 10 | "composite": true, 11 | "moduleResolution": "bundler", 12 | "resolveJsonModule": true, 13 | "verbatimModuleSyntax": true, 14 | "isolatedModules": true, 15 | 16 | // Linting 17 | "noErrorTruncation": true, 18 | "strict": true, 19 | "noFallthroughCasesInSwitch": true, 20 | "noUncheckedIndexedAccess": true, 21 | "noImplicitOverride": true, 22 | 23 | "outDir": "./node_modules/.cache/tsc_build" 24 | } 25 | } 26 | -------------------------------------------------------------------------------- /.github/workflows/main.yml: -------------------------------------------------------------------------------- 1 | name: Build & Test 2 | 3 | on: 4 | push: 5 | branches: [main] 6 | pull_request: 7 | branches: [main] 8 | 9 | jobs: 10 | build: 11 | runs-on: ubuntu-latest 12 | 13 | steps: 14 | - uses: actions/checkout@v4 15 | 16 | - name: Set up Node.js 17 | uses: actions/setup-node@v4 18 | with: 19 | node-version: lts/* 20 | cache: npm 21 | 22 | - run: npm ci 23 | - run: npm run build 24 | - run: npm run package 25 | 26 | - name: Upload artifact 27 | uses: actions/upload-artifact@v4 28 | with: 29 | name: youtube_adfree_ipk 30 | path: | 31 | ${{github.workspace}}/youtube.leanback.v4_*_all.ipk 32 | -------------------------------------------------------------------------------- /src/yt-fixes.css: -------------------------------------------------------------------------------- 1 | /* Fixes shorts thumbnails */ 2 | .ytLrTileHeaderRendererShorts { 3 | z-index: -1; 4 | } 5 | 6 | /* Makes black control underneath video player transparent. Set to 0 to remove it */ 7 | .ytLrWatchDefaultControlsBackground { /* webOS 24 */ 8 | opacity: 0.6; 9 | } 10 | .judYce { /* webOS 23 */ 11 | opacity: 0.6; 12 | } 13 | 14 | /** 15 | * Dirty hack to fix offset