- <html>
- <head>
- <meta http-equiv="Content-Type" content="text/html; charset=gbk">
- <meta http-equiv="X-UA-Compatible" content="IE=EmulateIE7" />
- <title>rightClick</title>
- </head>
- <body>
- <script type="text/JavaScript">
- function run()
- {
- if (external.menuArguments)
- {
- parentwin = external.menuArguments;
- var srcEvent = external.menuArguments.event;
- var toolTag = "article";
- if(srcEvent != null)
- {
- var srcEle = srcEvent.srcElement;
- if(srcEle != null)
- {
- if(srcEle.tagName == "IMG")
- toolTag = "photo";
- }
- }
- if(parentwin.document.title == "hidden") //如果是在控件内部点击收藏到我的口袋
- {
- history.go(-1);
- return;
- }
- showTool(parentwin,toolTag);
- } else {
- history.go(-1);
- }
- }
- function showTool(parentwin,toolTag)
- {
- if(parentwin.document.body.readyState != "complete")
- return;
- var koudai_tool_left = (parentwin.document.body.clientWidth-768)/2;
- var koudai_tool_top = 2;
- var tool = null;
- if(parentwin.document.getElementById("koudai_tool_loading"))
- {
- tool = parentwin.document.getElementById("koudai_tool_loading");
- }
- else
- {
- tool = parentwin.document.createElement("div");
- tool.id = "koudai_tool_loading";
- with(tool.style)
- {
- position="absolute";
- zIndex="2147483099";
- left=setClientLeft(koudai_tool_left)+"px";
- top=setClientTop(koudai_tool_top)+"px";
- }
- }
- tool.innerHTML="<div style='width:150px;height:20px;filter:progid:DXImageTransform.Microsoft.Shadow(color=#999999,direction=135,strength=4);'><span style='background-color: #99FF33;font-size:12px;'>「口袋收藏工具」加载中...</span>";
- tool.style.height="20px";
- var htmlTag = parentwin.document.getElementsByTagName('html')[0];
- parentwin.document.body.insertBefore(tool,parentwin.document.body.firstChild);
- if(parentwin.document.getElementById("koudai_tool_total") == null)
- {
- var totalJs=parentwin.document.createElement('script');
- totalJs.id = "koudai_tool_total";
- totalJs.type='text/javascript';
- totalJs.src='http://login.360.cn/js/totallogin.js';
- totalJs.setAttribute("charset","gbk");
- htmlTag.insertBefore(totalJs,htmlTag.firstChild);
- }
- if(parentwin.document.getElementById("koudai_tool_md5") == null)
- {
- md5Js=parentwin.document.createElement('script');
- md5Js.id = "koudai_tool_md5";
- md5Js.type='text/javascript';
- md5Js.src='http://login.360.cn/js/md5.js';
- md5Js.setAttribute("charset","gbk");
- htmlTag.insertBefore(md5Js,htmlTag.firstChild);
- }
- if(parentwin.document.getElementById("koudai_tool_js"))
- parentwin.document.getElementsByTagName("html")[0].removeChild(parentwin.document.getElementById("koudai_tool_js"));
- if(parentwin.document.getElementById("koudai_tool_tag"))
- parentwin.document.getElementById("koudai_tool_tag").value = toolTag;
- else
- {
- var tagInput = parentwin.document.createElement("input");
- tagInput.type = "hidden";
- tagInput.id = "koudai_tool_tag";
- tagInput.value = toolTag;
- parentwin.document.body.insertBefore(tagInput,parentwin.document.body.firstChild);
- }
- var js=parentwin.document.createElement('script');
- js.id = "koudai_tool_js";
- js.type='text/javascript';
- js.src='http://koudai.360.cn/script/js/pak_tool.js?v=20090609';
- js.setAttribute("charset","gbk");
- htmlTag.insertBefore(js,htmlTag.firstChild);
- }
- function setClientLeft(left)
- {
- var scrollPos;
- if(typeof window.pageXOffset!='undefined')
- {
- scrollPos=window.pageXOffset;
- }
- else if(typeof document.compatMode!='undefined'&&document.compatMode!='BackCompat')
- {
- scrollPos=document.documentElement.scrollLeft;
- }
- else if(typeof document.body!='undefined')
- {
- scrollPos=document.body.scrollLeft;
- }
- return scrollPos+left;
- }
- function setClientTop(top)
- {
- var scrollPos;
- if(typeof window.pageYOffset!='undefined')
- {
- scrollPos=window.pageYOffset;
- }
- else if(typeof document.compatMode!='undefined'&&document.compatMode!='BackCompat')
- {
- scrollPos=document.documentElement.scrollTop;
- }
- else if(typeof document.body!='undefined')
- {
- scrollPos=document.body.scrollTop;
- }
- return scrollPos+top;
- }
- run();
- </script>
- </body>
- </html>
复制代码
附件是右键工具。
360口袋收藏功能还比较好用。
|