Last active
August 29, 2015 14:06
-
-
Save dpnishant/db3efbc9b1f3ab986c40 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
if(location.href.match(/^https:\/\//gi)) { | |
var DOM = document.head.innerHTML.toString() + document.body.innerHTML.toString(); | |
var http_urls = DOM.match(/http:\/\/[^\"\'\s]*/gi); | |
if(http_urls) { | |
for(var i=http_urls.length-1;i>=0;i--) { | |
if (http_urls[i] !== 'http://') { | |
if (http_urls[i].slice(-3).match(/png|jpg|gif|css|\.js|swf|mp4|svg/gi)) | |
document.write(http_urls[i] + '<br/><br/>'); | |
} | |
}}} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment