-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathYoutube Stop Autoplay.user.js
31 lines (25 loc) · 1.08 KB
/
Youtube Stop Autoplay.user.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
// ==UserScript==
// @name Youtube Stop Autoplay
// @namespace https://github.com/johnnyawesome
// @version 1.0.2
// @description Take over the world! :)
// @author JohnnyAwesome
// @match http://www.youtube.com/*
// @match https://www.youtube.com/*
// @grant none
// @icon https://raw.githubusercontent.com/johnnyawesome/MyLogo/master/MySkull32.ico
// @icon64 https://raw.githubusercontent.com/johnnyawesome/MyLogo/master/MySkull64.ico
// @updateURL https://github.com/johnnyawesome/UserscriptYoutubeStopAutoplay/raw/master/Youtube%20Stop%20Autoplay.user.js
// @downloadURL https://github.com/johnnyawesome/UserscriptYoutubeStopAutoplay/raw/master/Youtube%20Stop%20Autoplay.user.js
// ==/UserScript==
(function() {
'use strict';
setInterval(turnAutoplayOff, 3000);
function turnAutoplayOff(){
//if Autplay is turned on....
if(document.querySelector("#improved-toggle[active]") || document.querySelector("#improved-toggle[checked]")){
//...turn it off.
document.querySelector("#improved-toggle[active]").click();
}
}
})();