SHOW:
|
|
- or go back to the newest paste.
1 | bx = document.body; | |
2 | - | if(typeof bx!=="undefined"){ |
2 | + | if(typeof bx!=="undefined" && bx!==null){ |
3 | - | var script = document.createElement("script"); |
3 | + | var scriptEnd = document.createElement("script"); |
4 | - | script.textContent = 'var ex=document.querySelectorAll("source[type]"),lx=ex.length,ix,px=new RegExp("^(audio|video)","i");if(lx!==0){for(ix=0;ix<lx;ix++){if(px.test(ex[ix].type)===true){ex[ix].removeAttribute("type");}}}'; |
4 | + | scriptEnd.textContent = 'var ex=document.querySelectorAll("source[type]"),lx=ex.length,ix,px=new RegExp("^(audio|video)","ig");if(lx!==0){for(ix=0;ix<lx;ix++){if(px.test(ex[ix].type)===true){ex[ix].removeAttribute("type");}}}'; |
5 | - | bx.appendChild(script); |
5 | + | bx.appendChild(scriptEnd); |
6 | } |