Skip to content

Instantly share code, notes, and snippets.

@emilisto
Created July 25, 2012 09:38
Show Gist options
  • Save emilisto/3175307 to your computer and use it in GitHub Desktop.
Save emilisto/3175307 to your computer and use it in GitHub Desktop.
(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