-
-
Save 9re/467693 to your computer and use it in GitHub Desktop.
This file contains 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 () { | |
var id = (function () { | |
var i, l, q, div, el, qs; | |
el = document.getElementsByTagName('SCRIPT'); | |
el = el[el.length-1]; | |
qs = el.src.split('?').pop().split('&'); | |
l = qs.length; | |
for (i=0; i<l; i++) { | |
q = qs[i].split('='); | |
if (q[0]=='id') { | |
div = document.createElement('DIV'); | |
div.appendChild(document.createTextNode('will replace with swf contents here.')); | |
div.setAttribute('id', q[1]); | |
el.parentNode.appendChild(div); | |
return q[1]; | |
} | |
} | |
})(); | |
var url = 'http://swf.wonderfl.net/swf/usercode' + /((((.).)..).*)/(id).slice(1).reverse().join('/'); | |
//swfobject.createSWF({data: url, width: '640', height: '480'}, {}, id); | |
swfobject.embedSWF(url, id, '640', '480', '10'); | |
})(); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment