/
flashblocknotifier.min.js
1 lines (1 loc) · 1.29 KB
/
flashblocknotifier.min.js
1
(function(b,d){function a(f){var e=f.parentNode;e&&e.removeChild(f)}var c=d.FlashBlockNotifier={__SWF_WRAPPER_CLASS:"fbn-swf-wrapper",__TIMEOUT:500,__TESTS:[function(e){return e.getAttribute("title")==="Flash"},function(f,e){return e.childNodes.length>1},function(e){return e.type&&e.type!="application/x-shockwave-flash"},function(e){return !e.parentNode},function(h){var f=h.parentNode;if(f){if(f.className.indexOf("CTFnodisplay")>-1){return true}try{if(f.parentNode.parentNode.id.indexOf("CTP")>-1){return true}}catch(g){}}return false}],embedSWF:function(j,p,m,o,f,i,h,l,n,k,e){var g=d.swfobject;if(!g){return}g.addDomLoadEvent(function(){var q=b.getElementById(p);if(!q){return}var r=b.createElement("div");r.className=c.__SWF_WRAPPER_CLASS;q.parentNode.replaceChild(r,q);r.appendChild(q);g.embedSWF(j,p,m,o,f,i,h,l,n,function(u){if(!u||u.success===false){k(u)}else{var v=u.ref,s=false;try{s=v&&v.getSVGDocument&&v.getSVGDocument()}catch(u){s=false}if(s){t(u)}else{d.setTimeout(function(){var y=c.__TESTS;for(var x=0,w=y.length;x<w;x++){if(y[x](v,r)){t(u);return}}k(u)},c.__TIMEOUT)}}function t(y){if(e!==false){g.removeSWF(p);a(r);var x=b.getElementById("CTFstack");if(x){a(x)}var w=b.body.lastChild;if(w&&w.className=="ujs_flashblock_placeholder"){a(w)}}y.success=false;y.__fbn=true;k(y)}})})}}})(document,window);