YouTube Pause Video On Click

By JoeSimmons Last update May 29, 2009 — Installed 1,063 times.

Remove div when video finishes

in
Subscribe to Remove div when video finishes 8 posts, 2 voices



zornn User

Is it possible to remove the div when the video ends so that you can click on those balloons with related videos?

 
JoeSimmons Script's Author

Yeah. Good idea. I'll run an interval of .25 seconds to check if the video is done. Look for ver 1.0.3.
EDIT: Done. It's a dodgy hack. This means it won't add it back when you go to another video from the bubble. I suggest you just use the related videos section on the bottom-right. It has the same videos but in another spot.

 
zornn User

But it works fine for me? Thanks! The only thing that seems to have stopped working is the loop function in Avindra's script. Doesn't matter, though. If I loop a video it's usually a music video and I don't use the pause function at all, so I can just disable this script momentarily then.

Thanks again.

 
zornn User

Ah, it removes the div if the video ends and I skim back through the video or reply it. What if you added a flag that is set to true when the playerstate gets set to 0 and then if the flag is true check in intervals whether the playerstate changes to 1 and re-add the div if it does?

 
JoeSimmons Script's Author

Yeah was thinking of that too.. I'll try to add that.

 
zornn User

So, did you have any luck or time to try it yet?

 
JoeSimmons Script's Author

Haven't tried yet, sorry. Just finished a script to save & paste multiple forms. Will look at that soon.

 
zornn User

Alright, thanks. :)

Cross
Presentational HTML allowed.
Use <code> for inline code and <pre> for code blocks. Use &lt; and &gt; for literal < and >.
We help break paragraphs and link your links.
or cancel