From 032a62ca01ff5f1c20bf9b1460e68d2ec7438806 Mon Sep 17 00:00:00 2001 From: Matt Pass Date: Sat, 21 Sep 2019 22:17:29 +0100 Subject: [PATCH] Update minified JS file to match --- lib/ice-coder.min.js | 67 ++++++++++++++++++++++---------------------- 1 file changed, 34 insertions(+), 33 deletions(-) diff --git a/lib/ice-coder.min.js b/lib/ice-coder.min.js index 979fbe9..d9be7b6 100644 --- a/lib/ice-coder.min.js +++ b/lib/ice-coder.min.js @@ -1,6 +1,6 @@ var get=function(a){return top.document.getElementById(a)},ICEcoder={filesW:250,minFilesW:14,maxFilesW:250,selectedTab:0,savedPoints:[],savedContents:[],canSwitchTabs:!0,openFiles:[],openFileMDTs:[],openFileVersions:[],cMInstances:[],nextcMInstance:1,selectedFiles:[],findMode:!1,scrollbarVisible:!1,mouseDown:!1,mouseDownInCM:!1,mouseDownMinimap:!1,draggingFilesW:!1,draggingTab:!1,draggingWithKey:!1,tabLeftPos:[],tabBGcurrent:"#1d1d1b",tabBGselected:"#49d",tabBGopen:"#c3c3c3",tabBGnormal:"transparent", -tabFGcurrent:"#fff",tabFGselected:"#fff",tabFGopenFile:"#000",tabFGnormalFile:"#eee",tabFGnormalTab:"#888",serverQueueItems:[],miniMapBoxTop:0,miniMapBoxHeight:0,previewWindow:!1,previewWindowLoading:!1,pluginIntervalRefs:[],overPopup:!1,cmdKey:!1,showingTool:!1,oppTagReplaceData:[],fmReady:!1,bugReportStatus:"off",bugReportPath:"",bugFilesSizesSeen:[],bugFilesSizesActual:[],githubDiff:!1,githubAuthTokenSet:!1,splitPane:!1,splitPaneLeftPerc:100,renderLineStyle:[],renderPaneShiftAmount:0,debounce:"", -editorFocusInstance:"",openSeconds:0,indexing:!1,ready:!1,initAliases:function(){for(var a="header files fileOptions optionsFile optionsEdit optionsSource optionsHelp filesFrame editor tabsBar findBar terminal output database git content tools footer nestValid versionsDisplay splitPaneControls splitPaneNamesMain splitPaneNamesDiff charDisplay byteDisplay docExplorer miniMap miniMapContainer miniMapContent functionClassList".split(" "),b=0;b=60*top.ICEcoder.autoLogoutMins&&top.ICEcoder.logout("autoLogout");top.ICEcoder.openSeconds++;0==top.ICEcoder.openSeconds%300&&(top.ICEcoder.filesFrame.contentWindow.frames.pingActive.location.href="lib/session-active-ping.php");top.ICEcoder.indexing||top.ICEcoder.loadingFile||0!==top.ICEcoder.serverQueueItems.length||0!=top.ICEcoder.openSeconds% @@ -19,7 +19,7 @@ a&&ICEcoder.filesW==ICEcoder.minFilesW)&&clearInterval(ICEcoder.changeFilesInt); top.ICEcoder.draggingFilesW=!0):top.ICEcoder.draggingFilesW=!1},lockUnlockNav:function(){var a=top.ICEcoder.filesFrame.contentWindow.document.getElementById("fmLock");ICEcoder.lockedNav=!ICEcoder.lockedNav;a.style.backgroundPosition=ICEcoder.lockedNav?"0 0":"-16px 0"},showHidePlugins:function(a){get("plugins").style.width="show"==a?"55px":"3px";get("plugins").style.background="show"==a?"#333":"transparent";"show"==a&&ICEcoder.changeFilesW("expand")},cMonFocus:function(a,b){top.ICEcoder.getCaretPosition(); top.ICEcoder.updateCharDisplay();top.ICEcoder.updateByteDisplay();top.ICEcoder.editorFocusInstance=b;top.ICEcoder.getCaretPosition()},cMonBlur:function(a,b){},cMonKeyUp:function(a,b){"undefined"!=typeof top.doFind&&clearInterval(top.doFind);top.doFind=setTimeout(function(){top.ICEcoder.findReplace(top.get("find").value,!0,!1)},500);top.ICEcoder.getCaretPosition();top.ICEcoder.updateCharDisplay();top.ICEcoder.updateByteDisplay()},cMonCursorActivity:function(a,b){top.ICEcoder.getCaretPosition();top.ICEcoder.updateCharDisplay(); top.ICEcoder.updateByteDisplay();a.removeLineClass(top.ICEcoder["cMActiveLine"+b],"background");a.getCursor("start").line==a.getCursor().line&&(top.ICEcoder["cMActiveLine"+b]=a.addLineClass(a.getCursor().line,"background","cm-s-activeLine"));"CSS"==top.ICEcoder.caretLocType&&top.ICEcoder.cssColorPreview();var c=-1")&&"undefined"!=typeof f&&"undo"!=c.origin&&"redo"!=c.origin&&"undefined"!=typeof f.open&&"undefined"!=typeof f.close){var g="open"==f.at?"close":"open";null!==f[g]&&(f=f[g].tag+";"+f[g].from.line+":"+f[g].from.ch,-1==top.ICEcoder.oppTagReplaceData.indexOf(f)&&top.ICEcoder.oppTagReplaceData.push(f))}}},cMonChange:function(a,b,c,d){var e;b=a.listSelections();top.ICEcoder.loadingFile? setTimeout(function(){a.replaceRange("X",{line:1,ch:1},{line:1,ch:1});a.undo();a.clearHistory();top.ICEcoder.savedPoints[top.ICEcoder.selectedTab-1]=a.changeGeneration();top.ICEcoder.savedContents[top.ICEcoder.selectedTab-1]=a.getValue()},0):top.ICEcoder.redoTabHighlight(top.ICEcoder.selectedTab);setTimeout(function(){top.ICEcoder.scrollBarVisible=a.getScrollInfo().height>a.getScrollInfo().clientHeight;top.ICEcoder.setLayout()},0);if("undefined"!=typeof top.ICEcoder.oppTagReplaceData[0])for(var f= 0;f=f.line;b--)e.replaceRange(e.getLine(b),{line:b+1,ch:0},{line:b+1,ch:1E6});e.replaceRange(m,{line:"up"==a?g.line:f.line,ch:0},{line:"up"==a?g.line:f.line,ch:1E6});e.setSelection({line:f.line+("up"==a?-1:1),ch:f.ch},{line:g.line+("up"==a?-1:1),ch:g.ch})})}},highlightLine:function(a){var b=top.ICEcoder.getcMInstance();var c=top.ICEcoder.getcMdiffInstance();b=-1\n"+d.getSelection()+"\n", -"around");for(var a=e+1;a<=f+1;a++)d.indentLine(a);d.indentLine(f+2,"prev");d.indentLine(f+2,"subtract")})}else-1<["p","a","h1","h2","h3"].indexOf(a)&&d.getSelection().substr(0,a.length+1)=="<"+b&&d.getSelection().substr(-(a.length+3))==""?d.replaceSelection(d.getSelection().substr(d.getSelection().indexOf(">")+1,d.getSelection().length-d.getSelection().indexOf(">")-1-a.length-3),"around"):("a"==a&&(b='a href=""'),d.replaceSelection("<"+b+">"+d.getSelection()+"","around"),"a"==a&& -d.setCursor({line:d.getCursor("start").line,ch:d.getCursor("start").ch+9}))},addLineBreakAtEnd:function(a){var b=ICEcoder.getcMInstance();var c=ICEcoder.getcMdiffInstance();b=-1",{line:a,ch:0},{line:a,ch:1E6})},insertLineBefore:function(a){var b=ICEcoder.getcMInstance();var c=ICEcoder.getcMdiffInstance();var d=-1\n"+ +d.getSelection()+"\n","around");for(var a=e+1;a<=f+1;a++)d.indentLine(a);d.indentLine(f+2,"prev");d.indentLine(f+2,"subtract")})}else-1<["p","a","h1","h2","h3"].indexOf(a)&&d.getSelection().substr(0,a.length+1)=="<"+b&&d.getSelection().substr(-(a.length+3))==""?d.replaceSelection(d.getSelection().substr(d.getSelection().indexOf(">")+1,d.getSelection().length-d.getSelection().indexOf(">")-1-a.length-3),"around"):("a"==a&&(b='a href=""'),d.replaceSelection("<"+b+">"+d.getSelection()+"","around"),"a"==a&&d.setCursor({line:d.getCursor("start").line,ch:d.getCursor("start").ch+9}))},addLineBreakAtEnd:function(a){var b=ICEcoder.getcMInstance();var c=ICEcoder.getcMdiffInstance();b=-1",{line:a,ch:0},{line:a,ch:1E6})},insertLineBefore:function(a){var b=ICEcoder.getcMInstance();var c=ICEcoder.getcMdiffInstance();var d=-1'+top.ICEcoder.functionClassList[b].name+'
'+top.ICEcoder.functionClassList[b].params+"");get("functionClassList").innerHTML=a},0))},updateFunctionClassListItems:function(a){var b=ICEcoder.getcMInstance(); var c="";-1'+get("miniMapContent").innerHTML+"";get("miniMapContent").innerHTML=get("miniMapContent").innerHTML.replace(/'; var b=get("miniMapBox");b=new Draggabilly(b,{axis:"y",containment:!0});b.on("dragMove",function(b,d,e){yPos=this.position.y;maxHeight=parseInt(get("docExplorer").style.height,10)<=parseInt(get("miniMapContent").getBoundingClientRect().height,10)?parseInt(get("docExplorer").style.height,10):parseInt(get("miniMapContent").getBoundingClientRect().height,10);newPerc=this.position.y/(maxHeight-top.ICEcoder.miniMapBoxHeight);yPos=(a.getScrollInfo().height-a.getScrollInfo().clientHeight)*newPerc;a.scrollTo(0, yPos)});b.on("pointerDown",function(a,b){top.ICEcoder.mouseDownMinimap=!0});b.on("pointerUp",function(a,b){top.ICEcoder.mouseDownMinimap=!1});top.ICEcoder.setMinimapLayout(a);get("docExplorer").style.right="-220px"}},setMinimapLayout:function(a,b){if(get("miniMapBox")&&a){var c=top.ICEcoder.getcMInstance();var d=a.getScrollInfo().top/(a.getScrollInfo().height-a.getScrollInfo().clientHeight);parseInt(get("miniMapContent").getBoundingClientRect().height,10)>parseInt(get("docExplorer").style.height, @@ -66,7 +66,7 @@ a);b.replaceSelection(a,"around")},searchForSelected:function(){var a=top.ICEcod d.parentNode.nextSibling&&(f=d.parentNode.nextSibling.nextSibling),f&&(f=f.childNodes[0]));"left"==b&&"folder"==e&&d.parentNode.previousSibling&&top.ICEcoder.openCloseDir(c,!1);if("right"==b||"enter"==b)"folder"==e?top.ICEcoder.openCloseDir(c,!0):top.ICEcoder.openFile(c.childNodes[1].id.replace(/\|/g,"/"));f&&f.childNodes[1]&&(top.ICEcoder.overFileFolder(e,f.childNodes[1].id),top.ICEcoder.selectFileFolder(a))},openCloseDir:function(a,b){var c;a.onclick=function(a){a.ctrlKey||top.ICEcoder.cmdKey|| top.ICEcoder.openCloseDir(this,!b)};var d=a.parentNode;d.nextSibling&&(d=d.nextSibling);d&&"UL"==d.tagName&&((c="none"==d.style.display)?b=!0:d.style.display="none",a.parentNode.className=a.className=c?"pft-directory dirOpen":"pft-directory");b?top.ICEcoder.filesFrame.contentWindow.frames.fileControl.location.href="lib/get-branch.php?location="+a.childNodes[1].id+"&csrf="+top.ICEcoder.csrf:"UL"==d.tagName&&d.parentNode.removeChild(d);return!1},overFileFolder:function(a,b){ICEcoder.thisFileFolderType= a;ICEcoder.thisFileFolderLink=b},isFileFolder:function(a){return(a=top.get("filesFrame").contentWindow.document.getElementById(a.replace(top.iceRoot,"").replace(/\/$/,"").replace(/\//g,"|")))?-1g.replace(/\d+/g,f)?d:g;if(0d&&("LI"!=b.childNodes[d].nodeName&&d++,e=b.childNodes[d].childNodes[0].childNodes[1],e.id==c&&(a=!0),1==a&&-1==top.ICEcoder.selectedFiles.indexOf(e.id)&&(ICEcoder.selectDeselectFile("select",e),top.ICEcoder.selectedFiles.push(e.id)),e.id!=g);d+=2);else ICEcoder.selectDeselectFile("select", e),top.ICEcoder.selectedFiles.push(d)}else top.ICEcoder.deselectAllFiles(),ICEcoder.selectDeselectFile("select",e),top.ICEcoder.selectedFiles.push(d)}top.ICEcoder.githubDiff&&(top.get("githubNavSelectedCount").innerHTML="Selected: "+top.ICEcoder.selectedFiles.length,top.get("githubNavCommit").style.color=0b?b+1:b),top.get("tab"+b).className="tab",top.get("tab"+b).style.opacity=1,b!=top.ICEcoder.dragTabNo?top.get("tab"+b).style.zIndex=1:setTimeout(function(){top.get("tab"+b).style.zIndex=1},150);if(top.ICEcoder.thisLeft&&!1!==top.ICEcoder.thisLeft){var c=[];for(b=1;b<=top.ICEcoder.openFiles.length;b++)c.push(b);c.splice(top.ICEcoder.dragTabNo-1,1);c.splice(a-1,0,top.ICEcoder.dragTabNo);ICEcoder.sortTabs(c)}top.ICEcoder.setTabWidths(); top.ICEcoder.draggingTab=!1;top.ICEcoder.thisLeft=!1},sortTabs:function(a){var b;var c=[ICEcoder.savedPoints,ICEcoder.savedContents,ICEcoder.openFiles,ICEcoder.openFileMDTs,ICEcoder.openFileVersions,ICEcoder.cMInstances];var d=[[],[],[],[],[],[]];for(var e=0;eb-5;)e.undo(),a++;if(top.ICEcoder.savedPoints[top.ICEcoder.selectedTab-1]==e.changeGeneration())top.ICEcoder.startSnake();else for(b=1;b<=a;b++)e.redo()},0);if(top.ICEcoder.snakePlaying)return 37==c&&(top.ICEcoder.snakeDir= -"left"),39==c&&(top.ICEcoder.snakeDir="right"),38==c&&(top.ICEcoder.snakeDir="up"),40==c&&(top.ICEcoder.snakeDir="down"),!1;if(224==c||91==c||93==c)top.ICEcoder.cmdKey=!0;if(46==c&&"files"==a)return top.ICEcoder.deleteFiles(),!1;if(b.altKey){var d=b.ctrlKey||top.ICEcoder.cmdKey?!0:!1;return"ctrl+alt"==top.ICEcoder.tagWrapperCommand&&d||"alt-left"==top.ICEcoder.tagWrapperCommand&&!d?"content"==a?68==c?(top.ICEcoder.tagWrapper("div"),!1):83==c?(top.ICEcoder.tagWrapper("span"),!1):80==c?(top.ICEcoder.tagWrapper("p"), -!1):65==c?(top.ICEcoder.tagWrapper("a"),!1):49==c?(top.ICEcoder.tagWrapper("h1"),!1):50==c?(top.ICEcoder.tagWrapper("h2"),!1):51==c?(top.ICEcoder.tagWrapper("h3"),!1):13==c?(top.ICEcoder.addLineBreakAtEnd(),!1):37==c?(top.ICEcoder.filesFrame.contentWindow.focus(),!1):c:37==c?(top.ICEcoder.filesFrame.contentWindow.focus(),!1):39==c?(top.ICEcoder.focus(-1Let\'s play
snake


Use arrow keys to eat your code

(it returns afterwards of course) :-)
'; -setTimeout(function(){top.ICEcoder.showHide("hide",top.get("blackMask"));top.get("mediaContainer").innerHTML="";top.ICEcoder.playSnake()},2E3)},playSnake:function(){var a=ICEcoder.getcMInstance();a.setOption("readOnly","nocursor");a.focus();top.ICEcoder.snakePreHistory=a.getHistory();top.ICEcoder.snakePreContent=a.getValue();top.ICEcoder.snakePreCursor=a.getCursor();a=Math.floor(50*Math.random());top.ICEcoder.snakePos=[[a,0],[a,-1],[a,-2],[a,-3],[a,-4]];top.ICEcoder.content.contentWindow.document.getElementById("game").style.display= -"block";top.ICEcoder.snakeDir="down";top.ICEcoder.doSnake();top.ICEcoder.snakeInt=setInterval(function(){var a=[];a[0]=top.ICEcoder.snakePos[0][0]+("right"==top.ICEcoder.snakeDir?1:"left"==top.ICEcoder.snakeDir?-1:0);a[1]=top.ICEcoder.snakePos[0][1]+("down"==top.ICEcoder.snakeDir?1:"up"==top.ICEcoder.snakeDir?-1:0);top.ICEcoder.snakePos.unshift(a);top.ICEcoder.snakePos.pop();top.ICEcoder.doSnake()},100)},doSnake:function(){var a;var b=ICEcoder.getcMInstance();var c=b.defaultCharWidth();var d=b.defaultTextHeight(); -var e=top.ICEcoder.content.contentWindow.document.getElementById("game").innerHTML="";for(a=0;a';top.ICEcoder.content.contentWindow.document.getElementById("game").innerHTML=e;e=b.coordsChar({top:top.ICEcoder.snakePos[0][1]*d+4,left:top.ICEcoder.snakePos[0][0]* -c+60});var f=b.getLine(e.line);if(top.ICEcoder.snakePos[0][0]-1<=f.length-2){var g="";if("\t"===f.substr(e.ch,1))for(a=0;atop.ICEcoder.snakePos[0][0]||0>top.ICEcoder.snakePos[0][1]||top.ICEcoder.snakePos[0][0]*c+60>a.clientWidth||top.ICEcoder.snakePos[0][1]*d+4>a.clientHeight||e)clearInterval(top.ICEcoder.snakeInt), -top.ICEcoder.content.contentWindow.document.getElementById("game").style.display="none",b.setValue(top.ICEcoder.snakePreContent),top.ICEcoder.savedPoints[top.ICEcoder.selectedTab-1]=b.changeGeneration(),top.ICEcoder.savedContents[top.ICEcoder.selectedTab-1]=top.ICEcoder.snakePreContent,b.setHistory(top.ICEcoder.snakePreHistory),top.ICEcoder.indicateChanges(),top.ICEcoder.redoTabHighlight(top.ICEcoder.selectedTab),b.setOption("readOnly",!1),b.setCursor(top.ICEcoder.snakePreCursor),b.focus(),top.ICEcoder.snakePlaying= -!1}}; +1)),c.push(top.ICEcoder.openFiles[e]),top.get("tab"+(e+1)).className="tab tabSlide";for(;0b-5;)e.undo(),a++;if(top.ICEcoder.savedPoints[top.ICEcoder.selectedTab-1]==e.changeGeneration())top.ICEcoder.startSnake();else for(b=1;b<=a;b++)e.redo()},0);if(top.ICEcoder.snakePlaying)return 37==d&&(top.ICEcoder.snakeDir= +"left"),39==d&&(top.ICEcoder.snakeDir="right"),38==d&&(top.ICEcoder.snakeDir="up"),40==d&&(top.ICEcoder.snakeDir="down"),!1;if(224==d||91==d||93==d)top.ICEcoder.cmdKey=!0;if(112===d){if(top.ICEcoder.codeZoomedOut)return;top.ICEcoder.codeZoomedOut=!0;var e=ICEcoder.getcMInstance();for(d=0;dsnake


Use arrow keys to eat your code

(it returns afterwards of course) :-)';setTimeout(function(){top.ICEcoder.showHide("hide",top.get("blackMask"));top.get("mediaContainer").innerHTML="";top.ICEcoder.playSnake()},2E3)},playSnake:function(){var a=ICEcoder.getcMInstance();a.setOption("readOnly","nocursor");a.focus();top.ICEcoder.snakePreHistory=a.getHistory(); +top.ICEcoder.snakePreContent=a.getValue();top.ICEcoder.snakePreCursor=a.getCursor();a=Math.floor(50*Math.random());top.ICEcoder.snakePos=[[a,0],[a,-1],[a,-2],[a,-3],[a,-4]];top.ICEcoder.content.contentWindow.document.getElementById("game").style.display="block";top.ICEcoder.snakeDir="down";top.ICEcoder.doSnake();top.ICEcoder.snakeInt=setInterval(function(){var a=[];a[0]=top.ICEcoder.snakePos[0][0]+("right"==top.ICEcoder.snakeDir?1:"left"==top.ICEcoder.snakeDir?-1:0);a[1]=top.ICEcoder.snakePos[0][1]+ +("down"==top.ICEcoder.snakeDir?1:"up"==top.ICEcoder.snakeDir?-1:0);top.ICEcoder.snakePos.unshift(a);top.ICEcoder.snakePos.pop();top.ICEcoder.doSnake()},100)},doSnake:function(){var a;var b=ICEcoder.getcMInstance();var c=b.defaultCharWidth();var d=b.defaultTextHeight();var e=top.ICEcoder.content.contentWindow.document.getElementById("game").innerHTML="";for(a=0;a';top.ICEcoder.content.contentWindow.document.getElementById("game").innerHTML=e;e=b.coordsChar({top:top.ICEcoder.snakePos[0][1]*d+4,left:top.ICEcoder.snakePos[0][0]*c+60});var f=b.getLine(e.line);if(top.ICEcoder.snakePos[0][0]-1<=f.length-2){var g="";if("\t"===f.substr(e.ch,1))for(a=0;atop.ICEcoder.snakePos[0][0]||0>top.ICEcoder.snakePos[0][1]||top.ICEcoder.snakePos[0][0]*c+60>a.clientWidth||top.ICEcoder.snakePos[0][1]*d+4>a.clientHeight||e)clearInterval(top.ICEcoder.snakeInt),top.ICEcoder.content.contentWindow.document.getElementById("game").style.display="none",b.setValue(top.ICEcoder.snakePreContent),top.ICEcoder.savedPoints[top.ICEcoder.selectedTab-1]=b.changeGeneration(),top.ICEcoder.savedContents[top.ICEcoder.selectedTab-1]=top.ICEcoder.snakePreContent, +b.setHistory(top.ICEcoder.snakePreHistory),top.ICEcoder.indicateChanges(),top.ICEcoder.redoTabHighlight(top.ICEcoder.selectedTab),b.setOption("readOnly",!1),b.setCursor(top.ICEcoder.snakePreCursor),b.focus(),top.ICEcoder.snakePlaying=!1}};