Created
October 17, 2019 19:49
-
-
Save isevcik/606a52140590fc01de7595e2a13e9a0b to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// ==UserScript== | |
// @name Youtube - remove autoplay in user chanel | |
// @namespace http://tampermonkey.net/ | |
// @version 0.1 | |
// @description try to take over the world! | |
// @author You | |
// @match https://www.youtube.com/channel/* | |
// @match https://www.youtube.com/user/* | |
// @grant none | |
// ==/UserScript== | |
(function() { | |
'use strict'; | |
const observer = new MutationObserver(function(mutations) { | |
const video = document.querySelector("video"); | |
if (video) { | |
video.pause(); | |
} | |
observer.observe(document, {attributes: false, childList: true, characterData: false, subtree: true}); | |
})(); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Free