Last active
August 29, 2015 14:01
-
-
Save Tarabyte/8aae06264126867b3560 to your computer and use it in GitHub Desktop.
Get path from script
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
var id = 'id' + (Math.random()*1e6|0).toString(16); | |
document.write('<script id="' + id + '" type="text/noexec"></script>'); | |
var marker = document.getElementById(id); | |
alert(marker.previousElementSibling.src||'inline'); | |
marker.parentNode.removeChild(marker); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment