作者:Lexi 主页:http://lexi.ucoz.ru/
实现方法:
2.Ctrl+F12->高级->下载->添加,MIME类型填text/cwf,选择"用其他应用程序打开",填入htm2clip.exe的路径
3.编辑菜单文件,在[Hotclick Popup Menu]下添加:
Platform Windows, Item, "带格式复制"="Go to Page, "javascript:(function(){var encodeBase64=function(a){var b='';var c=0;var i=0;var d='';var e=a.length;var f=[];var g='ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/';while(c=a.charCodeAt(i++)){if(c<0x80){f[f.length]=c}else>>6);f[f.length]=0x80|(c&0x3f)}else if(c<0x10000){f[f.length]=0xe0|(c>>12);f[f.length]=0x80|((c>>6)&0x3f);f[f.length]=0x80|(c&0x3f)}else{f[f.length]=0xf0|(c>>18);f[f.length]=0x80|((c>>12)&0x3f);f[f.length]=0x80|((c>>6)&0x3f);f[f.length]=0x80|(c&0x3f)}if(i==e){while(f.length%%3){f[f.length]=0;d+='='}}if(f.length>2){b+=g[f[0]>>2];b+=g[((f.shift()&3)<<4)|(f[0]>>4)];b+=g[((f.shift()&0xf)<<2)|(f[0]>>6)];b+=g[f.shift()&0x3f]}}return(b+d)};var selWin=function(w){if(w.getSelection()!='')return w;for(var i=0,f,r;f=w.frames[i];i++){try{if(r=arguments.callee(f))return r}catch(e){}}};var win=selWin(window);if(win){var doc=win.document;var link=win.location.href;if(win.location.protocol=='file:')link=link.replace('localhost','');var sel=doc.createDocumentFragment();var range=win.getSelection().getRangeAt(0);sel.appendChild(doc.createComment('StartFragment'));sel.appendChild(range.cloneContents());sel.appendChild(doc.createComment('EndFragment'));var ele=range.commonAncestorContainer;while(ele){if(ele.nodeType==1){var clone=ele.cloneNode(false);clone.appendChild(sel);sel=clone};ele=ele.parentNode};var head=doc.getElementsByTagName('head')[0];if(head){var h=sel.insertBefore(head.cloneNode(true),sel.firstChild);var b=h.getElementsByTagName('base')[0];if(!b){b=doc.createElement('base');h.insertBefore(b,h.firstChild)}if(!b.href)b.href=link;var m=h.getElementsByTagName('meta');for(var i=0,mi;mi=m[i];i++){if(mi.httpEquiv&&mi.httpEquiv.toLowerCase()=='content-type')mi.content='text/html; charset=utf-8'}};var scripts=sel.getElementsByTagName('script');for(var i=scripts.length-1;i>=0;i--){scripts[i].parentNode.removeChild(scripts[i])};var doctype='';var dt=doc.doctype;if(dt&&dt.name){doctype+='\n'};var f=doc.createElement('iframe');f.width=0;f.height=0;f.frameBorder='no';f.scrolling='no';f.src='data:text/cwf;charset=UTF-8;base64,'+encodeBase64('SourceURL:'+link+'\r\n\r\n'+doctype+sel.outerHTML);doc.documentElement.appendChild(f);f.parentNode.removeChild(f)}})();",,,"New Note""
作者也提供了安装程序 省了上面的功夫
http://lexi.ucoz.ru/oac/htm2clip_setup.zip
3 评论:
带格式的?不是很明白,如果网页上有一个
XXXX.rar
这样的下载链接,复制链接会把这个RAR文件一起复制下来吗?
不会只复制格式
恩恩,我知道了,试过了,很好用,谢谢!
发表评论