Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- // ==UserScript==
- // @name Youtube HTML5 stop autoplay
- // @namespace http://smiler.se/
- // @description Prevent HTML5 videos on youtube from autoplaying
- // @include http://youtube.com/watch?*
- // @include http://*.youtube.com/watch?*
- // @include http://youtube.com/watch#*
- // @include http://*.youtube.com/watch#*
- // @include http://*.youtube.com/embed/*
- // @include http://youtube.com/embed/*
- // @include https://youtube.com/watch?*
- // @include https://*.youtube.com/watch?*
- // @include https://youtube.com/watch#*
- // @include https://*.youtube.com/watch#*
- // @include https://*.youtube.com/embed/*
- // @include https://youtube.com/embed/*
- // ==/UserScript==
- function onLoad() {
- setTimeout(function(){
- video = document.getElementsByTagName('video')[0];
- if (video) {
- video.pause();
- video.currentTime = 0;
- }
- }, 300);
- }
- window.addEventListener('load', onLoad, false);
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement