项目作者: yulanggong

项目描述 :
A bookmarklet gets more images with same URL pattern of an image
高级语言: JavaScript
项目地址: git://github.com/yulanggong/more.git
创建时间: 2012-02-12T03:43:06Z
项目社区:https://github.com/yulanggong/more

开源协议:

下载


More

A bookmarklet fetchs more images with same URL parttern of an image.

How to use it?

Create a new bookmark, and paste the code below in the Address(URL) input.

  1. javascript:m=20;if(R=/(.*?)(\d{1,16})(\D*)$/.exec(location))l=R[2][L="length"],D=function(c){C="";z=c+m;c=0<c?c:0;U="<a%20href=javascript:D(";T="<hr><center>"+(c?U+(c-m)+")><"+c+"</a>":C)+"<input%20onchange=D(+this.value)>"+U+z+")>"+z+"></a><hr>";for(i=c;i<z;i++){p="";for(t=(i+p)[L];p[L]<l-t;)p+="0";i==b&&(h=l-t);a(p+i);!h&&l>t&&a(i)}document.body.innerHTML=T+C+T},a=function(c){C+="<img%20style=position:static%20onerror=this.parentNode.removeChild(this)%20src="+R[1]+c+R[3]+">"},D(b=+R[2])

Name it as more or what you like.

When you browse some images with numbers in the URL, click the bookmarklet. And the bookmarklet will try to fetch more images with the similar URL. If the URL looks like this

  1. http://example.com/..../abc-001.jpg

The bookmarklet will try to fetch this list of images

  1. http://example.com/..../abc-001.jpg
  2. http://example.com/..../abc-002.jpg
  3. http://example.com/..../abc-003.jpg
  4. http://example.com/..../abc-004.jpg
  5. http://example.com/..../abc-005.jpg
  6. and even more