youtube: initial version
This commit is contained in:
parent
0688931c39
commit
ad4d6f07ef
2 changed files with 16 additions and 0 deletions
|
@ -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
15
src/youtube.user.js
Normal 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…
Add table
Add a link
Reference in a new issue