IE右键快速转载到博客

本文介绍如何通过编辑注册表来实现Internet Explorer浏览器右键菜单的自定义功能,包括添加“收藏到cnblogs博客”选项的具体步骤。

摘要生成于 C知道 ,由 DeepSeek-R1 满血版支持, 前往体验 >

1213598879-clip-7kb.png

添加IE右键 注册表文件:

None.gifWindows Registry Editor Version 5.00
None.gif
None.gif[HKEY_CURRENT_USER\Software\Microsoft\Internet Explorer\MenuExt]
None.gif
None.gif[HKEY_CURRENT_USER\Software\Microsoft\Internet Explorer\MenuExt\收藏到cnblogs博客]
None.gif@="http://ext8.net/rightClick.html"

rightclick.html

None.gif<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
None.gif
<HTML><HEAD>
None.gif
<META http-equiv=Content-Type content="text/html; charset=utf-8">
ExpandedBlockStart.gifContractedBlock.gif
<SCRIPT language=JavaScript>dot.gif
InBlock.gif
if (external.menuArguments) 
ExpandedSubBlockStart.gifContractedSubBlock.gif
dot.gif{
InBlock.gif  
var selText = "";
InBlock.gif  
var strTitle = escape(external.menuArguments.document.title);
InBlock.gif  
var strURL = escape(external.menuArguments.location.href);
InBlock.gif
InBlock.gif  
var doc = external.menuArguments.document;
InBlock.gif  
InBlock.gif  
if ((doc.selection.type == "None"|| (doc.selection.type == "none"))
ExpandedSubBlockStart.gifContractedSubBlock.gif  
dot.gif{
InBlock.gif     alert(
"请选中网页上欲保存的文字和图片后再收藏!");
ExpandedSubBlockEnd.gif  }

InBlock.gif  
else
ExpandedSubBlockStart.gifContractedSubBlock.gif  
dot.gif{
InBlock.gif     selText 
= doc.selection.createRange().text;
InBlock.gif     
if (selText == "")
ExpandedSubBlockStart.gifContractedSubBlock.gif     
dot.gif{
InBlock.gif        alert(
"请选中网页上欲保存的文字和图片后再收藏!");
ExpandedSubBlockEnd.gif     }

InBlock.gif     
else
ExpandedSubBlockStart.gifContractedSubBlock.gif     
dot.gif{
InBlock.gif        external.menuArguments.document.execCommand(
"Copy");
InBlock.gif          
InBlock.gif        
var objChild;                           // Window
InBlock.gif
        var reWork = new RegExp('object','gi');    // Regular expression
InBlock.gif
        objChild = window.open("http://www.cnblogs.com/meetrice/admin/EditPosts.aspx?opt=1&title="+strTitle+"&url="+strURL,"objChild","toolbar=no,menubar=no,resizable=yes,location=no,status=yes,z-look=yes,alwaysRaised=yes,scrollbars=no");
InBlock.gif        
if(!reWork.test(String(objChild)))
InBlock.gif          alert(
"文章收藏页面被拦截!\r\n请设定你安装的拦截弹出窗口软件,使当前页面不被拦截!");
InBlock.gif        
ExpandedSubBlockEnd.gif     }

ExpandedSubBlockEnd.gif   }
  
ExpandedBlockEnd.gif}
 
None.gif
</SCRIPT>
None.gif
None.gif
<META content="MSHTML 6.00.2800.1609" name=GENERATOR></HEAD>
None.gif
<BODY></BODY></HTML>
None.gif

第三步:

ctrl+v
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值