Created
March 14, 2011 17:29
-
-
Save namusyaka/869501 to your computer and use it in GitHub Desktop.
現在開いているページのHTMLに含まれる画像URLを画像化して列挙するスクリプト。
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
javascript:(function(){ | |
var _d = document; | |
var array = _d.body.innerHTML.match(/("|')([^"']+?\.)(jpg|gif|png|bmp|jpeg)("|')/ig); | |
if(!array) | |
return alert('見つからなかった。'); | |
var exist = {}; | |
for(var i=0; i < array.length; i++) { | |
if(!exist[array[i]]) { | |
_d.write('<img src=' + array[i] + '>'); | |
exist[array[i]] = 1 | |
} | |
} | |
_d.close() | |
})() |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment