From d044dbf2050f2db8f83ce98f8670e8238803b80b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?0=25=20=5B=E2=96=88=20=E2=96=88=20=E2=96=88=20=E2=96=88=20?= =?UTF-8?q?=E2=96=88=20=E2=96=88=20=E2=96=88=20=E2=96=88=20=E2=96=88=20?= =?UTF-8?q?=E2=96=88=5D=20100=25?= Date: Thu, 9 Jul 2026 15:34:04 -0500 Subject: [PATCH] Added license and readme --- LICENSE | 18 ++++++++++++++++++ README.md | 47 +++++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 65 insertions(+) create mode 100644 LICENSE create mode 100644 README.md diff --git a/LICENSE b/LICENSE new file mode 100644 index 0000000..7c7e5db --- /dev/null +++ b/LICENSE @@ -0,0 +1,18 @@ +MIT License + +Copyright (c) 2026 mastercodeon + +Permission is hereby granted, free of charge, to any person obtaining a copy of this software and +associated documentation files (the "Software"), to deal in the Software without restriction, including +without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the +following conditions: + +The above copyright notice and this permission notice shall be included in all copies or substantial +portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT +LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO +EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER +IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE +USE OR OTHER DEALINGS IN THE SOFTWARE. \ No newline at end of file diff --git a/README.md b/README.md new file mode 100644 index 0000000..503d564 --- /dev/null +++ b/README.md @@ -0,0 +1,47 @@ +# YouTube Music Auto-Confirm & Anti-Pause + +A lightweight, highly effective Tampermonkey userscript that ensures uninterrupted listening on YouTube Music. It automatically dismisses "Are you still there?" prompts, auto-accepts viewer discretion warnings, and spoofs user activity to prevent playback from pausing in the background. + +## ✨ Features + +* **Anti-Pause Activity Spoofing**: Silently spoofs user activity (simulating keypresses and updating internal trackers) every minute to prevent YouTube's inactivity timer from triggering. +* **Auto-Dismiss "Are you still there?"**: If the inactivity popup does manage to appear, the script instantly detects it, clicks "Yes", and resumes playback. +* **Auto-Accept Discretion Warnings**: Automatically clicks "I understand and wish to proceed" on content warnings (e.g., suicide/self-harm topics) and resumes the video/song. +* **Native UI Integration**: Injects a sleek, non-intrusive status badge into the top-right YouTube Music navigation bar. It features a pulsing green dot and tracks how many times activity has been spoofed. +* **Smart Loop Prevention**: Includes a 3-second action cooldown and promise-based error handling to prevent infinite play/pause loops caused by strict browser autoplay policies. + +## 🚀 Installation + +1. **Install a Userscript Manager**: + * [Tampermonkey](https://www.tampermonkey.net/) (Recommended) + * [Violentmonkey](https://violentmonkey.github.io/) + * [Greasemonkey](https://www.greasespot.net/) +2. **Install the Script**: + * **Option A (Direct Install)**: Click on the `YouTube_Music_Auto_Confirm_-Are_You_Still_There-_&_Discretion_Warning-1.9.user.js` file in this repository, click the **Raw** button, and your userscript manager should prompt you to install it. + * **Option B (Manual)**: Open your userscript manager dashboard, click "Create a new script", copy the entire contents of the `.user.js` file from this repository, paste it into the editor, and save (Ctrl+S / Cmd+S). +3. **Refresh YouTube Music**: Reload any open `music.youtube.com` tabs for the script to take effect. + +## 💻 Usage + +Once installed, the script runs completely in the background. You don't need to configure anything. + +To verify it is working: +1. Open [YouTube Music](https://music.youtube.com). +2. Look at the top right corner of the navigation bar (next to your profile picture/cast icon). +3. You should see a subtle **Anti-Pause: 0** badge with a pulsing dot. The number will increase every minute as the script spoofs activity to keep your session alive. + +## 🛠️ How It Works (Technical Details) + +* **Activity Spoofing**: YouTube tracks inactivity via the `window._lact` variable. The script updates this timestamp to `Date.now()` and dispatches a harmless `Shift` keyup event every 60 seconds. +* **DOM Monitoring**: The script polls the DOM every 2 seconds (and listens for HTML5 `