Page 1 of 1
How To Block YouTube Autoplay
Posted: Sun Aug 01, 2010 3:42 am
by Jahzoone
Hi,
I looked around on the forum and the web for a way to block Youtubes Autoplay Feature Globally. You can turn it off for individual subscriptions but not globally. Several sites said install AdBlocker pluggin, I was just wondering if this could be accomplished in the NoScript pluggin? Any ideas are welcome because this new AutoPlay "feature" is seriously annonying!!!!!!!!!!!1
Re: How To Block YouTube Autoplay
Posted: Sun Aug 01, 2010 10:00 pm
by Giorgio Maone
NoScript Options|Embeddings|Apply these restrictions to whitelisted sites as well
Re: How To Block YouTube Autoplay
Posted: Mon Aug 02, 2010 12:08 am
by Jahzoone
Hi,
I ticked the box (Apply these restrictions to whitelisted sites as well) and it didn't really stop the Autoplay Feature YouTube has added. Autoplay loads the next video from your subscription list, but now has the NoScript icon on the video. What I need to do is stop the autoplay from loading the next webpage. If anyone from Google reads this thread, Turn this annoying Autoplay (so called) Feature OFF!
Re: How To Block YouTube Autoplay
Posted: Mon Aug 02, 2010 1:54 am
by Guest
IMO you're looking at the wrong tool in the wrong place.
If you want to alter a website's behavior, try user scripts. Or, here's a crazy idea, use the YouTube suggestions forum instead of hoping someone who a) works at Google and b) cares happens to read this.
Re: How To Block YouTube Autoplay
Posted: Mon Aug 02, 2010 11:01 am
by Jahzoone
You're probably right, I already found a solution on YouTube which involves the Firefox Browser, Greasmonkey Plugin and a special script. I was only hoping that since I already use NoScript there might be away to configure it to block the Autoplay, if not that's OK it's still a great tool.
As far as the message to Google, that's all that is. A protest, sorry if it was inappropriate in this forum.
Re: How To Block YouTube Autoplay
Posted: Mon Aug 02, 2010 11:46 am
by Giorgio Maone
Jahzoone wrote: Greasmonkey Plugin and a special script.
If it can be done with GreaseMonkey, it most likely can be done with NoScript using a surrogate script.
Can I se the GM script in question?
Re: How To Block YouTube Autoplay
Posted: Mon Aug 02, 2010 1:49 pm
by therube
Just searching ...
http://userscripts.org/scripts/show/12008
http://userscripts.org/scripts/source/12008.user.js
Code: Select all
// ==UserScript==
// @name Youtube Prevent Autoplay
// @namespace userscripts.org
// @version 0.9
// @description Prevents videos from playing automatically by replacing the default youtube.com player with the youtube player that doesn't autostart playback
// @include http://youtube.com/watch*
// @include http://*.youtube.com/watch*
// @include http://*.youtube.com/user/*
// ==/UserScript==
with(document.getElementById('movie_player'))
{
setAttribute("flashvars","autoplay=0&"+getAttribute("flashvars"));
src+="#";
}
http://www.google.com/search?q=Block+Yo ... nt=mozilla
(Some kind of error when I posted. "Resubmitted", & it appeared to go, but looking again I see it had not. Thank goodness for Recently Closed Windows, so that I didn't have to rewrite this

.)
Re: How To Block YouTube Autoplay
Posted: Mon Aug 02, 2010 1:56 pm
by Giorgio Maone
As a script surrogate, can be done by adding the following 2 string preferences to
about:config
noscript.surrogate.noAutoPlay.sources
noscript.surrogate.noAutoPlay.replacement
Code: Select all
with(document.getElementById('movie_player')){setAttribute("flashvars","autoplay=0&"+getAttribute("flashvars"));src+="#"}
[Edit]
Corrected the replacement preference name.
Re: How To Block YouTube Autoplay
Posted: Mon Aug 02, 2010 2:58 pm
by Jahzoone
Hey this is great, I had a feeling NoScript could get the job done, since after all that's what noScript does, block scripts. Thank you Giorgio Maone and therube for your help. I will try the fix when I get off work and let you know what happens.
Re: How To Block YouTube Autoplay
Posted: Tue Aug 03, 2010 1:06 am
by Jahzoone
OK, I added the 2 strings to about:config in Firefox, restarted the browser, then went to YouTube and Logged-in to see what happened. The Autoplay was still working, so I searched around youtube forums and videos again and found a different script from the one posted originally, this seems to be the updated Greasemonkey script:
Code: Select all
// ==UserScript==
// @name Subscription Bar
// @namespace Adam Rock
// @include http://*youtube.com/watch?v=*
// ==/UserScript==
if (/[\?&]playnext=1/i.test(document.location.href))
document.location.replace(document.location.href.replace("playnext=1","playnext=0"));
GM_addStyle("#quicklist-bar{display: none}");
GM_addStyle("#quicklist-tray-container{display: none}");
GM_addStyle("#quicklist-bar-container{display: none}");
The documentation links are:
http://www.youtube.com/watch?v=jIMzoOiGzxY
http://userscripts.org/scripts/show/82587
Any thoughts welcome
Re: How To Block YouTube Autoplay
Posted: Tue Aug 03, 2010 5:34 pm
by Guest
Jahzoone wrote:OK, I added the 2 strings to about:config in Firefox, restarted the browser, then went to YouTube and Logged-in to see what happened. The Autoplay was still working [...]
That would be because Giorgio has an error in his post (the second preference should be
noscript.surrogate.noAutoPlay.replacement).
Jahzoone wrote:[...] this seems to be the updated Greasemonkey script
It's a completely different one, because there are many ways of getting rid of that annoying "feature". Tampering with the YouTube player's Flash variables, calling the page function that disables autoplay, adding a GET parameter to the URL that disables autoplay, etc.
Re: How To Block YouTube Autoplay
Posted: Wed Aug 04, 2010 12:37 pm
by Jahzoone
Alright the rename fixed the script, unfortunately I don't know if it worked to block the Autoplay because when I tried to test it last night I found Youtube changed the default setting from ON to OFF and made the option "sticky" so it remembers the state of the switch.
One cool effect of the surrogate script is when you surf to a YouTube page the player doesn't start automatically, you have to manually click the Play button.
Re: How To Block YouTube Autoplay
Posted: Fri Oct 15, 2010 8:20 pm
by metal321
If you are using Firefox there is an addon called "Stop Autoplay."
I am looking for something that works with Seamonkey but most
addons don't seem to work with it.
https://addons.mozilla.org/en-US/firefox/addon/1765/
Re: How To Block YouTube Autoplay
Posted: Fri Oct 15, 2010 8:51 pm
by therube
A number of things to consider, it looks like:
> I don't have time to maintain Stop Autoplay. The extension is still buggy and the code needs to be rewritten, but that is beyond my ability.
(Maintain can be gotten around, generally. Buggy could be a different matter. And last updated 2008, so might be even harder for FF 3.6 compatibility?)
> Don't use this feature with Flashblock extension.
(Flashblock being a common extension.)
> Due to Bug 236839, you have to enable JavaScript to make Stop Autoplay to work
(Not all sites require JS to play media, so you may not ordinarily Allow a particular site otherwise.)
Firefox Extension: Stop Autoplay
http://hemiolapei.free.fr/divers/sap/sap-en.html
Re: How To Block YouTube Autoplay
Posted: Sun Oct 17, 2010 5:29 pm
by Jahzoone
Hummmmm, this Stop Autoplay extension looks a bit under developed and while not a bad idea for a plugin let's not forget that Youtube has abandoned the Autoplay Feature, at least for now. If someone just wants to stop a video from automatically starting on a Youtube page or channel the script mentioned earlier in this thread works great.
Giorgio Maone wrote:As a script surrogate, can be done by adding the following 2 string preferences to
about:config
noscript.surrogate.noAutoPlay.sources
noscript.surrogate.noAutoPlay.replacement
Code: Select all
with(document.getElementById('movie_player')){setAttribute("flashvars","autoplay=0&"+getAttribute("flashvars"));src+="#"}
[Edit]
Corrected the replacement preference name.