📄 dialog_imagemap.js
字号:
var OxO73c9=["contains","parentNode","selection","document","type","None","Text","body","rangeCount","window","Control","anchorOffset","childNodes","anchorNode","isCollapsed","focusNode","length","nodeType","nodeName","INPUT","TEXTAREA","BUTTON","IMG","SELECT","TABLE","position","style","absolute","relative","top","contentWindow","contentDocument","parentWindow","id","frames","frameElement","//TODO:frame contentWindow not found?","iframe","editor","img","onload","src","","src_cetemp","contentEditable","designMode","on","clearAttributes","marginTop","0","marginLeft","color","black","background","white","unselectable","2D-Position","LiveResize","outerHTML","innerHTML","useMap","MAP","name","#","areas","href","target","alt","coords",",","\x3Cimg id=\x27myIMAGE","\x27 border=1 src=\x27Load.ashx?type=image\x26file=space.gif\x27 alt=\x27[[AddLinktoImageMap]]\x27 style=\x27position:absolute;left:","px;top:","px;width:","px;height:","px;z-index:","\x27\x3E","Load.ashx?Type=Dialog\x26file=MapLink.htm","dialogWidth:350px;dialogHeight:212px;help:no;scroll:no;status:no;resizable:0;","frameloaded","zoom","height","width","\x27 border=1 src=\x27Load.ashx?type=image\x26file=space.gif\x27 alt=\x27[[AddLinktoImageMap]]\x27 style=\x27position:absolute;z-index:",";width:20;height:20;left:",";top:","myIMAGE","\x3Carea shape=\x27rect\x27 coords=\x27","\x27","href=\x27","\x27 ","target=\x27","alt=\x27","\x3E","PasteHTML","\x3Cmap name=\x27","\x3C/map\x3E","off","AutoMap","display","img_zoom_in","none","img_zoom_out","img_bestfit","img_actualsize"]; function Element_Contains(element,Ox21a){if(!Browser_IsOpera()){if(element[OxO73c9[0x0]]){return element.contains(Ox21a);} ;} ;for(;Ox21a!=null;Ox21a=Ox21a[OxO73c9[0x1]]){if(element==Ox21a){return true;} ;} ;return false;} ; function Window_CreateSelectionRange(Ox1a5){var range;if(Browser_UseIESelection()){var Ox213=Ox1a5[OxO73c9[0x3]][OxO73c9[0x2]];if(Ox213[OxO73c9[0x4]]==OxO73c9[0x5]||Ox213[OxO73c9[0x4]]==OxO73c9[0x6]){ range=Ox213.createRange() ;} else { range=document[OxO73c9[0x7]].createTextRange() ; range.moveToElement(Ox213.createRange().item(0x0)) ;} ;} else {var Ox213=Ox1a5.getSelection();if(Ox213[OxO73c9[0x8]]==0x0){ range=Ox1a5[OxO73c9[0x3]].createRange() ;} else { range=Ox213.getRangeAt(0x0).cloneRange() ;} ;} ; range[OxO73c9[0x9]]=Ox1a5 ;return range;} ; function Window_GetSelectionNode(Ox1a5){var Ox21a=Window_GetSelectionNode_Core(Ox1a5);if(Ox21a==Ox1a5[OxO73c9[0x3]][OxO73c9[0x7]]){return null;} ;if(!Element_Contains(Ox1a5[OxO73c9[0x3]].body,Ox21a)){return null;} ;return Ox21a;} ; function Window_GetSelectionNode_Core(Ox1a5){var Ox213;if(Browser_UseIESelection()){ Ox213=Ox1a5[OxO73c9[0x3]][OxO73c9[0x2]] ;if(Ox213[OxO73c9[0x4]]==OxO73c9[0x5]||Ox213[OxO73c9[0x4]]==OxO73c9[0x6]){return Ox213.createRange().parentElement();} ;return Ox213.createRange().item(0x0);} ;var Ox213=Ox1a5.getSelection();if(Window_GetSelectionType(Ox1a5)==OxO73c9[0xa]){return Ox213[OxO73c9[0xd]][OxO73c9[0xc]][Ox213[OxO73c9[0xb]]];} ;if(Ox213[OxO73c9[0xe]]){return Ox213[OxO73c9[0xd]];} ;if(Ox213[OxO73c9[0xd]]==Ox213[OxO73c9[0xf]]){return Ox213[OxO73c9[0xd]];} ;var p=Ox213[OxO73c9[0xd]];var Ox21e=p[OxO73c9[0xc]];for(var i=0x0;i<Ox21e[OxO73c9[0x10]];i++){var Ox1ae=Ox21e.item(i);if(Ox213.containsNode(Ox1ae,true)){if(i!=0x0&&Ox213.containsNode(Ox21e.item(i-0x1),false)){continue ;} ;if(i<Ox21e[OxO73c9[0x10]]-0x1&&Ox213.containsNode(Ox21e.item(i+0x1),false)){continue ;} ;return Ox1ae;} ;} ;if(Ox213[OxO73c9[0x8]]==0x1){return Range_GetParentNode(Window_CreateSelectionRange(Ox1a5));} ;if(!Element_Contains(Ox1a5[OxO73c9[0x3]][OxO73c9[0x7]],Ox213.anchorNode)){return null;} ;return Element_GetSameParent(Ox213[OxO73c9[0xd]],Ox213.focusNode);} ; function Window_GetSelectionElement(Ox1a5){var Ox21a=Window_GetSelectionNode(Ox1a5);if(Ox21a==null){return null;} ;if(Ox21a[OxO73c9[0x11]]==0x1){return Ox21a;} ;return Ox21a[OxO73c9[0x1]];} ; function Window_GetSelectionType(Ox1a5){if(Browser_UseIESelection()){return Ox1a5[OxO73c9[0x3]][OxO73c9[0x2]][OxO73c9[0x4]];} ;var Ox213=Ox1a5.getSelection();if(Ox213[OxO73c9[0xe]]){return OxO73c9[0x6];} ;if(Ox213[OxO73c9[0xd]]!=Ox213[OxO73c9[0xf]]){return OxO73c9[0x6];} ;var p=Ox213[OxO73c9[0xd]];var Ox21e=p[OxO73c9[0xc]];for(var i=0x0;i<Ox21e[OxO73c9[0x10]];i++){var Ox1ae=Ox21e.item(i);if(Ox1ae[OxO73c9[0x11]]!=0x1){continue ;} ;if(Ox213.containsNode(Ox1ae,true)){if(i!=0x0&&Ox213.containsNode(Ox21e.item(i-0x1),false)){continue ;} ;if(i<Ox21e[OxO73c9[0x10]]-0x1&&Ox213.containsNode(Ox21e.item(i+0x1),false)){continue ;} ;if(Element_IsBlockControl(Ox1ae)){return OxO73c9[0xa];} ;return OxO73c9[0x6];} ;} ;return OxO73c9[0x6];} ; function Element_IsBlockControl(element){var name=element[OxO73c9[0x12]];if(name==OxO73c9[0x13]){return true;} ;if(name==OxO73c9[0x14]){return true;} ;if(name==OxO73c9[0x15]){return true;} ;if(name==OxO73c9[0x16]){return true;} ;if(name==OxO73c9[0x17]){return true;} ;if(name==OxO73c9[0x18]){return true;} ;var Ox16a=element[OxO73c9[0x1a]][OxO73c9[0x19]];if(Ox16a==OxO73c9[0x1b]||Ox16a==OxO73c9[0x1c]){return true;} ;return false;} ; function Window_GetDialogTop(Ox1a5){return Ox1a5[OxO73c9[0x1d]];} ; function Frame_GetContentWindow(Ox224){if(Ox224[OxO73c9[0x1e]]){return Ox224[OxO73c9[0x1e]];} ;if(Ox224[OxO73c9[0x1f]]){if(Ox224[OxO73c9[0x1f]][OxO73c9[0x20]]){return Ox224[OxO73c9[0x1f]][OxO73c9[0x20]];} ;} ;var Ox1a5;if(Ox224[OxO73c9[0x21]]){ Ox1a5=window[OxO73c9[0x22]][Ox224[OxO73c9[0x21]]] ;if(Ox1a5){return Ox1a5;} ;} ;var len=window[OxO73c9[0x22]][OxO73c9[0x10]];for(var i=0x0;i<len;i++){ Ox1a5=window[OxO73c9[0x22]][i] ;if(Ox1a5[OxO73c9[0x23]]==Ox224){return Ox1a5;} ;if(Ox1a5[OxO73c9[0x3]]==Ox224[OxO73c9[0x1f]]){return Ox1a5;} ;} ; Debug_Todo(OxO73c9[0x24]) ;} ;var iframe=Window_GetElement(window,OxO73c9[0x25],true);var iframe_win=Frame_GetContentWindow(iframe);var obj=Window_GetDialogArguments(window);var editor=obj[OxO73c9[0x26]];var editwin=obj[OxO73c9[0x9]];var editdoc=obj[OxO73c9[0x3]];var oImg=obj[OxO73c9[0x27]];var oMap=null;var aMapName= new Array();var aLeft= new Array();var aTop= new Array();var aWidth= new Array();var aHeight= new Array();var aHref= new Array();var aTarget= new Array();var aTitle= new Array();var aCoords= new Array(); window[OxO73c9[0x28]]=function window_onload(){var src; src=oImg.getAttribute(OxO73c9[0x29])+OxO73c9[0x2a] ;if(oImg.getAttribute(OxO73c9[0x2b])){ src=oImg.getAttribute(OxO73c9[0x2b])+OxO73c9[0x2a] ;} ; oImg[OxO73c9[0x29]]=src ;if(Browser_IsWinIE()){ iframe_win[OxO73c9[0x3]][OxO73c9[0x7]][OxO73c9[0x2c]]=true ;} else { iframe_win[OxO73c9[0x3]][OxO73c9[0x2d]]=OxO73c9[0x2e] ; iframe_win[OxO73c9[0x3]][OxO73c9[0x7]][OxO73c9[0x2c]]=true ;} ; iframe_win[OxO73c9[0x3]][OxO73c9[0x7]][OxO73c9[0x2f]] ; iframe_win[OxO73c9[0x3]][OxO73c9[0x7]][OxO73c9[0x1a]][OxO73c9[0x30]]=OxO73c9[0x31] ; iframe_win[OxO73c9[0x3]][OxO73c9[0x7]][OxO73c9[0x1a]][OxO73c9[0x32]]=OxO73c9[0x31] ; iframe_win[OxO73c9[0x3]][OxO73c9[0x7]][OxO73c9[0x1a]][OxO73c9[0x33]]=OxO73c9[0x34] ; iframe_win[OxO73c9[0x3]][OxO73c9[0x7]][OxO73c9[0x1a]][OxO73c9[0x35]]=OxO73c9[0x36] ; oImg[OxO73c9[0x37]]=OxO73c9[0x2e] ;if(Browser_IsWinIE()){ iframe_win[OxO73c9[0x3]].execCommand(OxO73c9[0x38],true,true) ; iframe_win[OxO73c9[0x3]].execCommand(OxO73c9[0x39],true,true) ;} ; iframe_win.focus() ;if(Browser_IsWinIE()){ iframe_win[OxO73c9[0x3]][OxO73c9[0x7]][OxO73c9[0x3b]]=oImg[OxO73c9[0x3a]] ;} else { iframe_win[OxO73c9[0x3]][OxO73c9[0x7]][OxO73c9[0x3b]]=outerHTML(oImg) ;} ;var Ox232=oImg[OxO73c9[0x3c]];if(Ox232!=OxO73c9[0x2a]){ Ox232=Ox232.toUpperCase() ;var Ox233=editdoc[OxO73c9[0x7]].getElementsByTagName(OxO73c9[0x3d]);for(var i=0x0;i<Ox233[OxO73c9[0x10]];i++){ aMapName[i]=Ox233[i][OxO73c9[0x3e]].toUpperCase() ;if((OxO73c9[0x3f]+aMapName[i])==Ox232){ oMap=Ox233[i] ;} ;} ;} ;if(oMap){for(var i=0x0;i<oMap[OxO73c9[0x40]][OxO73c9[0x10]];i++){ aHref[i]=oMap[OxO73c9[0x40]][i][OxO73c9[0x41]] ; aTarget[i]=oMap[OxO73c9[0x40]][i][OxO73c9[0x42]] ; aTitle[i]=oMap[OxO73c9[0x40]][i][OxO73c9[0x43]] ; aCoords[i]=oMap[OxO73c9[0x40]][i][OxO73c9[0x44]] ;var Ox135=aCoords[i].split(OxO73c9[0x45]); aLeft[i]=parseInt(Ox135[0x0]) ; aTop[i]=parseInt(Ox135[0x1]) ; aWidth[i]=parseInt(Ox135[0x2])-aLeft[i] ; aHeight[i]=parseInt(Ox135[0x3])-aTop[i] ; iframe_win[OxO73c9[0x3]][OxO73c9[0x7]][OxO73c9[0x3b]]+=OxO73c9[0x46]+i+OxO73c9[0x47]+aLeft[i]+OxO73c9[0x48]+aTop[i]+OxO73c9[0x49]+aWidth[i]+OxO73c9[0x4a]+aHeight[i]+OxO73c9[0x4b]+(i+0x1)+OxO73c9[0x4c] ;} ;} ;} ; function SearchSelectionElement(Ox235){var body=iframe_win[OxO73c9[0x3]][OxO73c9[0x7]];for(var Oxa2=Window_GetSelectionElement(iframe_win);Element_Contains(body,Oxa2);Oxa2=Oxa2[OxO73c9[0x1]]){if(Oxa2[OxO73c9[0x12]]==Ox235){return Oxa2;} ;} ;return null;} ; function Addlink(){var img=SearchSelectionElement(OxO73c9[0x16]);if(!img){return ;} ; function Ox1f6(arr){if(arr){ aHref[Ox239]=arr[0x0] ; aTarget[Ox239]=arr[0x1] ; aTitle[Ox239]=arr[0x2] ;} ;} ;var Ox238=img[OxO73c9[0x21]];var Ox239=parseInt(Ox238.substr(0x7));var obj={editor:editor,href:aHref[Ox239],target:aTarget[Ox239],title:aTitle[Ox239]}; editor.SetNextDialogWindow(window) ; editor.ShowDialog(Ox1f6,OxO73c9[0x4d],obj,OxO73c9[0x4e]) ;} ;if(!Window_GetDialogTop(window)[OxO73c9[0x4f]]){ Window_GetDialogTop(window)[OxO73c9[0x4f]]=true ;} ; function do_cancel(){ Window_SetDialogReturnValue(window,null) ; Window_CloseDialog(window) ;} ; function Zoom_In(){if(iframe_win[OxO73c9[0x3]][OxO73c9[0x7]][OxO73c9[0x1a]][OxO73c9[0x50]]!=0x0){ iframe_win[OxO73c9[0x3]][OxO73c9[0x7]][OxO73c9[0x1a]][OxO73c9[0x50]]*=1.2 ;} else { iframe_win[OxO73c9[0x3]][OxO73c9[0x7]][OxO73c9[0x1a]][OxO73c9[0x50]]=1.2 ;} ;} ; function Zoom_Out(){if(iframe_win[OxO73c9[0x3]][OxO73c9[0x7]][OxO73c9[0x1a]][OxO73c9[0x50]]!=0x0){ iframe_win[OxO73c9[0x3]][OxO73c9[0x7]][OxO73c9[0x1a]][OxO73c9[0x50]]*=0.8 ;} else { iframe_win[OxO73c9[0x3]][OxO73c9[0x7]][OxO73c9[0x1a]][OxO73c9[0x50]]=0.8 ;} ;} ; function BestFit(){if(!oImg){return ;} ;var Oxbc=0x118;var Oxbd=0x122; iframe_win[OxO73c9[0x3]][OxO73c9[0x7]][OxO73c9[0x1a]][OxO73c9[0x50]]=0x1/Math.max(oImg[OxO73c9[0x52]]/Oxbd,oImg[OxO73c9[0x51]]/Oxbc) ;} ; function Actualsize(){ iframe_win[OxO73c9[0x3]][OxO73c9[0x7]][OxO73c9[0x1a]][OxO73c9[0x50]]=0x1 ;} ; function newMap(){var n=aHref[OxO73c9[0x10]];var Ox33=(oImg[OxO73c9[0x52]]-0x14)*0.5;var Ox29=(oImg[OxO73c9[0x51]]-0x14)*0.5; aHref[n]=OxO73c9[0x2a] ; aTarget[n]=OxO73c9[0x2a] ; aTitle[n]=OxO73c9[0x2a] ; iframe_win[OxO73c9[0x3]][OxO73c9[0x7]][OxO73c9[0x3b]]+=OxO73c9[0x46]+n+OxO73c9[0x53]+(n+0x1)+OxO73c9[0x54]+Ox33+OxO73c9[0x55]+Ox29+OxO73c9[0x4c] ; iframe_win.scrollBy(0x0,0x0) ; iframe_win.focus() ;} ; function do_update(){var Ox17=false;for(var i=0x0;i<aHref[OxO73c9[0x10]];i++){var obj=Window_GetElement(iframe_win,OxO73c9[0x56]+i,false);if(obj){ Ox17=true ;} ;} ;if(Ox17){var Ox92=OxO73c9[0x2a];for(var i=0x0;i<aHref[OxO73c9[0x10]];i++){var obj=Window_GetElement(iframe_win,OxO73c9[0x56]+i,false);if(obj){var Ox240=parseInt(obj[OxO73c9[0x1a]].left);var Ox241=parseInt(obj[OxO73c9[0x1a]].top);var Ox242=parseInt(obj[OxO73c9[0x1a]].width);var Ox243=parseInt(obj[OxO73c9[0x1a]].height);var Ox244=Ox240+Ox242;var Ox245=Ox241+Ox243; Ox92+=OxO73c9[0x57]+Ox240+OxO73c9[0x45]+Ox241+OxO73c9[0x45]+Ox244+OxO73c9[0x45]+Ox245+OxO73c9[0x58] ;if(aHref[i]!=OxO73c9[0x2a]){ Ox92+=OxO73c9[0x59]+aHref[i]+OxO73c9[0x5a] ;} ;if((aTarget[i]!=OxO73c9[0x2a])&&aTarget[i]){ Ox92+=OxO73c9[0x5b]+aTarget[i]+OxO73c9[0x5a] ;} ;if(aTitle[i]!=OxO73c9[0x2a]&&aTitle[i]!=null){ Ox92+=OxO73c9[0x5c]+aTitle[i]+OxO73c9[0x5a] ;} ; Ox92+=OxO73c9[0x5d] ;} ;} ;if(oMap){ oMap[OxO73c9[0x3b]]=Ox92 ;} else {var Ox232=getAutoMapName(); oImg[OxO73c9[0x3c]]=OxO73c9[0x3f]+Ox232 ; editor.ExecCommand(OxO73c9[0x5e],false,OxO73c9[0x5f]+Ox232+OxO73c9[0x4c]+Ox92+OxO73c9[0x60]) ;} ;} else {if(oMap){if(Browser_IsWinIE()){ oMap[OxO73c9[0x3a]]=OxO73c9[0x2a] ;} ;} ; oImg[OxO73c9[0x3c]]=OxO73c9[0x2a] ;} ; oImg[OxO73c9[0x37]]=OxO73c9[0x61] ; oImg.removeAttribute(OxO73c9[0x37]) ; editor.InsertElement(oImg) ; window.close() ; Window_CloseDialog(window) ;} ; function getAutoMapName(){var Ox17=true;var n=0x0;var Ox2a=OxO73c9[0x2a];while(Ox17){ n++ ; Ox2a=OxO73c9[0x62]+n ;if(isValidMapName(Ox2a)){ Ox17=false ;} ;} ;return Ox2a;} ; function isValidMapName(Ox24){ Ox24=Ox24.toUpperCase() ;for(var i=0x0;i<aMapName[OxO73c9[0x10]];i++){if(aMapName[i]==Ox24){return false;} ;} ;return true;} ; function do_cancel(){ oImg.removeAttribute(OxO73c9[0x37]) ; Window_CloseDialog(window) ;} ;if(!Browser_IsWinIE()){ Window_GetElement(window,OxO73c9[0x64],true)[OxO73c9[0x1a]][OxO73c9[0x63]]=OxO73c9[0x65] ; Window_GetElement(window,OxO73c9[0x66],true)[OxO73c9[0x1a]][OxO73c9[0x63]]=OxO73c9[0x65] ; Window_GetElement(window,OxO73c9[0x67],true)[OxO73c9[0x1a]][OxO73c9[0x63]]=OxO73c9[0x65] ; Window_GetElement(window,OxO73c9[0x68],true)[OxO73c9[0x1a]][OxO73c9[0x63]]=OxO73c9[0x65] ;} ;
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -