lightbox for google

针对特定网站的规则分享、讨论

Moderator: phoenix

Post Reply
ddbb
Moderator
Posts: 425
Joined: Jan 07 2008, 13:30

lightbox for google

Post by ddbb »

今天无聊的时候乱转看到了这个......觉得挺好玩的就弄出来了.....
比较了两个....第1个功能比较多....第2个效果比较炫....
http://jquery.com/demo/thickbox/
http://www.doknowevil.net/litebox/
最后选中了第2个 先做到google 本来是打算做一个url list 随便用到哪个画面都可以.....不过发现比较难......

提示.....点图片的上面和下面能关闭....左右不行......第1个可以.....如果不在乎效果可以试试.....

先把附件解到html下......结构Proxomitron\html\litebox\js\litebox-1.0.js (直接用上面LINK里的原版的话 要自己改点东西 可以比对一下看我是改的哪里)

然后规则是

Code: Select all

[Patterns]
Name = "Images: Litebox add code    09.06.09  [ddandyy]"
Active = TRUE
URL = "$TST(hCT=*html)images.google."
Bounds = "<a\s*>"
Limit = 1024
Match = "*/imgres\?imgurl\=\1\&imgrefurl\=\2\&*"
Replace = "<a  href="\1"  rel="lightbox[example]">"

Name = "Images: Litebox  JS and CSS     09.06.09  [ddandyy]"
Active = TRUE
Multi = TRUE
URL = "$TST(hCT=*html)images.google."
Limit = 10
Match = "</body>"
Replace = "<link rel="stylesheet" href="http://local.ptron/litebox/css/lightbox.css" type="text/css" media="screen" />"
          "<script type="text/javascript" src="http://local.ptron/litebox/js/prototype.lite.js"></script>"
          "<script type="text/javascript" src="http://local.ptron/litebox/js/moo.fx.js"></script>"
          "<script type="text/javascript" src="http://local.ptron/litebox/js/litebox-1.0.js"></script>"
          "</body>$STOP()"
效果图
litebox.gif
litebox.gif (654.61 KiB) Viewed 21596 times
Attachments
litebox.zip
(186.39 KiB) Downloaded 1745 times
ddbb
Moderator
Posts: 425
Joined: Jan 07 2008, 13:30

Re: lightbox for google

Post by ddbb »

http://www.huddletogether.com/projects/lightbox2/

这还有一个同样效果但是能点左右关闭的.....只不过体积比较大......
不过既然是弄到本地了 体积应该无所谓了.........
User avatar
phoenix
Site Admin
Posts: 529
Joined: Dec 29 2007, 16:27

Re: lightbox for google

Post by phoenix »

$TST(hCT=*html) 是 sidki 的 alpha 规则包中的用法,他有专门的规则来设置这个变量。考虑到你这个规则对 sidki 的规则包的依赖不大,改成 $TYPE(htm) 会好些。
ddbb
Moderator
Posts: 425
Joined: Jan 07 2008, 13:30

Re: lightbox for google

Post by ddbb »

最新的版本 我选择了

http://www.dolem.com/lytebox/

效果差不多........不过更炫一点.......点图片外面任何一个地方都能关闭........

功能也更多......支持幻灯片.....也支持iframe......不过现在还没做这些........

目前已经做了 只要LINK是图片的 都会是lytebox效果.......对应所有URL........(可能偶尔会有误杀)

附件解压到html下........基本上就是原版......只改动了里面CSS里图片的URL.......原版是相对URL..现在改为绝对URL.....

Code: Select all

[Patterns]
Name = "Images: Lytebox add code for google    09.06.19  [ddandyy]"
Active = TRUE
URL = "$TYPE(htm)images.google.$SET(LBOXFLG=true)"
Bounds = "<a\s*>"
Limit = 1024
Match = "*/imgres\?imgurl\=\1\&imgrefurl\=\2\&*"
Replace = "<a class="ProXFlPref" href="\1" onmouseover="prxO.oFly.flShow(prxO.oFly.flLink("
          "'Originating&#160;Page','\2'),event,1);" onmouseout="prxO.oFly.flDHide();" rel="lytebox[vacation]">"

Name = "Images: Lytebox add code    09.06.19  [ddandyy]"
Active = TRUE
URL = "$TYPE(htm)"
Bounds = "<a\s*>"
Limit = 300
Match = "(*href="*.(jpge|gif|png|jpg)"[^>]+)\1>$SET(LBOXFLG=true)"
Replace = "\1 rel="lytebox[vacation]">"

Name = "Images: Lytebox JS and CSS     09.06.19  [ddandyy]"
Active = TRUE
Multi = TRUE
URL = "$TYPE(htm)"
Limit = 10
Match = "</body>$TST(LBOXFLG=true)$SET(LBOXFLG=)"
Replace = "\r\n"
          "<link rel="stylesheet" href="http://local.ptron/lytebox/css/lytebox.css" type="text/css" media="screen" />\r\n"
          "<script type="text/javascript" src="http://local.ptron/lytebox/js/lytebox.js"></script>\r\n"
          "</body>$STOP()"

Attachments
lytebox.zip
(40.13 KiB) Downloaded 1649 times
polluxboy
Posts: 21
Joined: Apr 21 2010, 08:55

Re: lightbox for google

Post by polluxboy »

不明白有什么效果诶
Post Reply