Browse Source

youtube: initial version

master
Conduitry 2 months ago
parent
commit
cc4f23fdf1
2 changed files with 16 additions and 0 deletions
  1. +1
    -0
      README.md
  2. +15
    -0
      src/youtube.user.js

+ 1
- 0
README.md View File

@ -3,6 +3,7 @@
* [e621 thing](https://chor.date/e621.user.js) - A script to make browsing e621.net while not signed in more convenient, and to work around the global blacklist forced on anonymous users.
* [e926 thing](https://chor.date/e926.user.js) - A script to redirect you from e926.net to e621.net.
* [TV Tropes thing](https://chor.date/tvtropes.user.js) - A script to remove the "This is page #x you have viewed this month without ads" banner.
* [YouTube thing](https://chor.date/youtube.user.js) - A script to unset autoplay.
## License

+ 15
- 0
src/youtube.user.js View File

@ -0,0 +1,15 @@
// ==UserScript==
// @name YouTube thing
// @namespace https://chor.date
// @description A script to unset autoplay.
// @match https://www.youtube.com/*
// @icon https://www.youtube.com/favicon.ico
// @version 0
// ==/UserScript==
setTimeout(() => {
const el = document.querySelector('.ytd-compact-autoplay-renderer[role=button][aria-pressed=true]');
if (el) {
el.dispatchEvent(new MouseEvent('click'));
}
}, 5000);

Loading…
Cancel
Save