📄 contextmenu.js
字号:
var DocPopupContextMenu=window.createPopup();
function document.oncontextmenu()
{ var width=120;
var height=0;
var left=event.clientX;
var top=event.clientY;
DocDisabledContextMenu();
var ObjPopDocument=DocPopupContextMenu.document;
var ContextMenuStr='';
for (var i=0;i<DocContextMenuArr.length;i++)
{
if (DocContextMenuArr[i].ExeFunction=='seperator')
{
ContextMenuStr+=FormatSeperator();
height+=16;
}
else
{
ContextMenuStr+=FormatMenuRow(DocContextMenuArr[i].ExeFunction,DocContextMenuArr[i].Description.replace('\(','\(<U>').replace(')','</U>)'),DocContextMenuArr[i].EnabledStr);
height+=20;
}
}
ContextMenuStr="<TABLE border=0 cellpadding=0 cellspacing=0 class=Menu width=120>"+ContextMenuStr
ContextMenuStr=ContextMenuStr+"<\/TABLE>";
ObjPopDocument.open();
ObjPopDocument.write("<link href=\"../Inc/ContextMenu.css\" type=\"text/css\" rel=\"stylesheet\"><body scroll=\"no\" onConTextMenu=\"window.event.returnValue=false;\" onselectstart=\"window.event.returnValue=false;\">"+ContextMenuStr);
ObjPopDocument.close();
height+=4;
if(left+width > document.body.clientWidth) left-=width;
if(top+height > document.body.clientHeight) top-=height;
DocPopupContextMenu.show(left, top, width, height, document.body);
return false;
}
function FormatSeperator()
{
var MenuRowStr="<tr><td height=16 valign=middle ><hr class=\"Seperator\" width=95%><\/td><\/tr>";
return MenuRowStr;
}
function FormatMenuRow(MenuOperation,MenuDescription,EnabledStr)
{
var MenuRowStr="<tr "+EnabledStr+"><td align=left height=20 class=MouseOut onMouseOver=this.className='MouseOver'; onMouseOut=this.className='MouseOut'; valign=middle"
if (EnabledStr=='') MenuRowStr+=" onclick=\""+MenuOperation+"parent.DocPopupContextMenu.hide();\"> ";
else MenuRowStr+="> ";
MenuRowStr=MenuRowStr+MenuDescription+"<\/td><\/tr>";
return MenuRowStr;
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -