From 610a879405711992fd7dd86b049aecb7a86f613a Mon Sep 17 00:00:00 2001 From: zomo Date: Sat, 5 Sep 2026 14:39:32 -0500 Subject: [PATCH] added twitch embed login fix --- dist/twitch-embed-login.user.js | 17 +++++++++++++++++ readme.md | 4 ++++ scripts/twitch-embed-login/main.ts | 6 ++++++ scripts/twitch-embed-login/meta.json | 9 +++++++++ scripts/twitch-embed-login/tsconfig.json | 17 +++++++++++++++++ 5 files changed, 53 insertions(+) create mode 100644 dist/twitch-embed-login.user.js create mode 100644 scripts/twitch-embed-login/main.ts create mode 100644 scripts/twitch-embed-login/meta.json create mode 100644 scripts/twitch-embed-login/tsconfig.json diff --git a/dist/twitch-embed-login.user.js b/dist/twitch-embed-login.user.js new file mode 100644 index 0000000..57efa91 --- /dev/null +++ b/dist/twitch-embed-login.user.js @@ -0,0 +1,17 @@ +// ==UserScript== +// @name twitch embed login fix +// @namespace zomo.dev +// @match https://twitch.tv/embed/* +// @version 1.0 +// @description embedded twitch frames will automatically request cookie access from the browser. as long as you're logged in to twitch and cookies aren't fully blocked this will keep you logged into embedded frames +// @runat document-start +// @downloadURL https://git.zomo.dev/zomo/browser-scripts/raw/branch/main/dist/twitch-embed-login.user.js +// @supportURL https://git.zomo.dev/zomo/browser-scripts/issues +// @homepageURL https://git.zomo.dev/zomo/browser-scripts +// ==/UserScript== +;(async () => { + if (!(await document.hasStorageAccess())) { + await document.requestStorageAccess() + location.reload() + } +})() diff --git a/readme.md b/readme.md index 459ba14..718c99b 100644 --- a/readme.md +++ b/readme.md @@ -9,6 +9,10 @@ Requires Violentmonkey (or Tampermonkey etc): [Chrome](https://chrome.google.com - **zomo.dev** v1.1 - `https://x.com/*`,`https://twitter.com/*` - redir x.com and twitter.com -> xcancel.com +- [twitch embed login fix](https://git.zomo.dev/zomo/browser-scripts/raw/branch/main/dist/fuck-twitter copy.user.js) + - **zomo.dev** v1.0 + - `https://twitch.tv/embed/*` + - embedded twitch frames will automatically request cookie access from the browser. as long as you're logged in to twitch and cookies aren't fully blocked this will keep you logged into embedded frames - [Hunger Games BrantSteele WebP Support](https://git.zomo.dev/zomo/browser-scripts/raw/branch/main/dist/hungergames-brantsteele-webp.user.js) - **zomo.dev** v1.0 - `https://brantsteele.net/hungergames/edit.php` diff --git a/scripts/twitch-embed-login/main.ts b/scripts/twitch-embed-login/main.ts new file mode 100644 index 0000000..f2b8a26 --- /dev/null +++ b/scripts/twitch-embed-login/main.ts @@ -0,0 +1,6 @@ +;(async () => { + if (!(await document.hasStorageAccess())) { + await document.requestStorageAccess() + location.reload() + } +})() diff --git a/scripts/twitch-embed-login/meta.json b/scripts/twitch-embed-login/meta.json new file mode 100644 index 0000000..f00d11e --- /dev/null +++ b/scripts/twitch-embed-login/meta.json @@ -0,0 +1,9 @@ +{ + "$schema": "https://git.zomo.dev/zomo/browser-scripts-builder/raw/branch/main/meta.schema.json", + "name": "twitch embed login fix", + "description": "embedded twitch frames will automatically request cookie access from the browser. as long as you're logged in to twitch and cookies aren't fully blocked this will keep you logged into embedded frames", + "namespace": "zomo.dev", + "match": ["https://twitch.tv/embed/*"], + "version": "1.0", + "runat": "document-start" +} diff --git a/scripts/twitch-embed-login/tsconfig.json b/scripts/twitch-embed-login/tsconfig.json new file mode 100644 index 0000000..0314104 --- /dev/null +++ b/scripts/twitch-embed-login/tsconfig.json @@ -0,0 +1,17 @@ +{ + "compilerOptions": { + "target": "es2021", + "module": "commonjs", + "esModuleInterop": true, + "forceConsistentCasingInFileNames": true, + "skipLibCheck": true, + "strict": true, + "noImplicitReturns": true, + "noUnusedLocals": true, + "noUnusedParameters": true, + "types": [ + "../../node_modules/@types/greasemonkey", + "../../node_modules/browser-scripts-builder" + ] + } +}