VideoSub icon indicating copy to clipboard operation
VideoSub copied to clipboard

throws errors on pages with no video tags

Open abritinthebay opened this issue 13 years ago • 0 comments

This is a problem if you're building a library which may or may not have video on page load. For example in any modern javascript application.

Simple fix - in videosub_main add this as the second line:

if(!myVideo) { return; }

and then add below the domReady call:

$VIDEOSUB.fn.videosub = videosub_main;

So the code is callable when needed. In fact I'd suggest removing the dom call entirely.

abritinthebay avatar Dec 04 '12 21:12 abritinthebay