1
Fork 0

youtube: initial version

This commit is contained in:
Conduitry 2020-04-20 20:12:35 -04:00
parent 0688931c39
commit ad4d6f07ef
2 changed files with 16 additions and 0 deletions

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
src/youtube.user.js Normal file
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);