Created
July 25, 2012 09:38
-
-
Save emilisto/3175307 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(function(global) { | |
// Globals | |
if(!global.Silp) { global.Silp = {}; }; | |
var Silp = global.Silp; | |
// To keep track of which embeds we have already processed | |
if(!Silp.foundEls) Silp.foundEls = []; | |
var foundEls = Silp.foundEls; | |
var els = document.getElementsByTagName('script'); | |
var re = /.*shootitlive\.load\.([^/]+\.)?js/; | |
for(var i = 0; i < els.length; i++) { | |
var el = els[i]; | |
if(el.src.match(re) && foundEls.indexOf(el) < 0) { | |
foundEls.push(el); | |
console.log('Identified embed tag %o with info: %o', el, info); | |
} | |
} | |
}()); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment