Flash uses <object>and tags <embed>. Make getElementsByTagNameFlash on these two tags:
var flash1=document.getElementsByTagName("object");
var flash2=document.getElementsByTagName("embed");
Please note that YouTube uses elements <iframe>, so it’s harder to capture them. Also, make sure you run this after all the items are loaded (aka window.onload), otherwise you will skip some or all.
source
share