- UID
- 5109
- 帖子
- 98
- 精华
- 0
- 贡献
- 0
- 推广
- 0
- 有效BUG
- 0
- 注册时间
- 2005-11-25
|
20#
发表于 2005-11-29 21:26
| 只看该作者
给你的TW增加个""复制图片链接"功能
呵呵,喜欢用的人还挺多的哦,下面就是代码了!
安装文件如下:将它存为*.inf文件就可以了.
[Version]
Signature="$Chicago$"
Provider="MetaBuilders"
[DestinationDirs]
DefaultDestDir=10,"web"
[DefaultInstall]
AddReg=CopyImageUrl_AddReg
CopyFiles=CopyImageUrl_CopyFiles
[CopyImageUrl_CopyFiles]
CopyImageUrl.html
[CopyImageUrl_AddReg]
HKCU,"Software\Microsoft\Internet Explorer\MenuExt\复制图片链接",,0x00000000,"%10%\web\CopyImageUrl.html"
HKCU,"Software\Microsoft\Internet Explorer\MenuExt\复制图片链接","contexts",1,02
HTML文件如下,保存为*.html就可以了
- <SCRIPT LANGUAGE="JavaScript" defer>
- var parentWin = external.menuArguments;
- var srcEvent = external.menuArguments.event;
- var doc = parentWin.document;
- var eventElement = doc.elementFromPoint ( srcEvent.clientX, srcEvent.clientY );
- var cpb = parentWin.clipboardData;
-
- var srcImage = eventElement;
- var str = new String(srcImage.href.toString());
- str = + str +
-
- cpb.setData("Text",str.toString());
-
- </SCRIPT>
复制代码 |
|