From 50a4a3e4bcf3dbbecea3f1d348d6f49f78c108b1 Mon Sep 17 00:00:00 2001 From: Matt Pass Date: Fri, 23 Jan 2015 08:46:44 +0000 Subject: [PATCH] Update to match main JS --- lib/ice-coder.min.js | 143 ++++++++++++++++++++++--------------------- 1 file changed, 72 insertions(+), 71 deletions(-) diff --git a/lib/ice-coder.min.js b/lib/ice-coder.min.js index 19b7aca..3209ba5 100644 --- a/lib/ice-coder.min.js +++ b/lib/ice-coder.min.js @@ -47,19 +47,19 @@ top.ICEcoder.filesFrame.contentWindow.document.getElementById(top.ICEcoder.selec b.style.backgroundColor=c?top.ICEcoder.tabBGopen:top.ICEcoder.tabBGnormal,b.style.color="select"==a?top.ICEcoder.tabFGselected:top.ICEcoder.tabFGnormalFile)},boxSelect:function(a,b){var c,d;c=top.filesFrame.contentWindow.document.getElementById("fmDragBox");"down"==b&&(top.ICEcoder.fmDragBoxStartX=top.ICEcoder.mouseX,top.ICEcoder.fmDragBoxStartY=top.ICEcoder.mouseY,top.ICEcoder.fmDragSelectFirst="",top.ICEcoder.fmDragSelectLast="");top.ICEcoder.mouseDown&&"drag"==b&&(top.ICEcoder.fmDraggedBox=!0, d=0"+top.t["Creating Folder"]+"
"+b)},openFile:function(a){var b;a&&(top.ICEcoder.thisFileFolderLink=a,top.ICEcoder.thisFileFolderType= -"file");"/[NEW]"!=top.ICEcoder.thisFileFolderLink&&!1!==top.ICEcoder.isOpen(top.ICEcoder.thisFileFolderLink)?top.ICEcoder.switchTab(top.ICEcoder.isOpen(top.ICEcoder.thisFileFolderLink)+1):""!=top.ICEcoder.thisFileFolderLink&&"file"==top.ICEcoder.thisFileFolderType&&(a=top.ICEcoder.thisFileFolderLink.replace(/\|/g,"/"),b=!0,100<=top.ICEcoder.openFiles.length&&(top.ICEcoder.message(top.t["Sorry you can..."]),b=!1),b&&(top.ICEcoder.shortURL=a,"/[NEW]"!=a?(top.ICEcoder.thisFileFolderLink=top.ICEcoder.thisFileFolderLink.replace(/\//g, +newFolder:function(){var a,b;a=top.ICEcoder.selectedFiles[top.ICEcoder.selectedFiles.length-1].replace(/\|/g,"/");if(b=top.ICEcoder.getInput("Enter new folder name at "+a,""))b=(a+"/"+b).replace(/\/\//,"/"),top.ICEcoder.serverQueue("add","lib/file-control-xhr.php?action=newFolder&csrf="+top.ICEcoder.csrf,b.replace(/\//g,"|")),top.ICEcoder.serverMessage(""+top.t["Creating Folder"]+"
"+b)},openFile:function(a){var b;a&&(top.ICEcoder.thisFileFolderLink=a,top.ICEcoder.thisFileFolderType="file"); +"/[NEW]"!=top.ICEcoder.thisFileFolderLink&&!1!==top.ICEcoder.isOpen(top.ICEcoder.thisFileFolderLink)?top.ICEcoder.switchTab(top.ICEcoder.isOpen(top.ICEcoder.thisFileFolderLink)+1):""!=top.ICEcoder.thisFileFolderLink&&"file"==top.ICEcoder.thisFileFolderType&&(a=top.ICEcoder.thisFileFolderLink.replace(/\|/g,"/"),b=!0,100<=top.ICEcoder.openFiles.length&&(top.ICEcoder.message(top.t["Sorry you can..."]),b=!1),b&&(top.ICEcoder.shortURL=a,"/[NEW]"!=a?(top.ICEcoder.thisFileFolderLink=top.ICEcoder.thisFileFolderLink.replace(/\//g, "|"),top.ICEcoder.serverQueue("add","lib/file-control.php?action=load&file="+top.ICEcoder.thisFileFolderLink+"&csrf="+top.ICEcoder.csrf),top.ICEcoder.serverMessage(""+top.t["Opening File"]+"
"+top.ICEcoder.shortURL)):top.ICEcoder.createNewTab("new"),top.ICEcoder.fMIconVis("fMView",1)))},openFilesFromList:function(a){for(var b=0;b"+top.t.Getting+"
"+a)},saveFile:function(a){var b,c;a=a?"saveAs":"save";b=ICEcoder.openFiles[ICEcoder.selectedTab-1].replace(top.iceRoot,"").replace(/\//g,"|");"|[NEW]"==b&&0"+top.t.Getting+"
"+a)},saveFile:function(a){var b,c;a=a?"saveAs":"save";b=ICEcoder.openFiles[ICEcoder.selectedTab-1].replace(top.iceRoot,"").replace(/\//g,"|");"|[NEW]"==b&&0"+top.t.Saving+"
"+ICEcoder.openFiles[ICEcoder.selectedTab-1].replace(top.iceRoot,""))},renameFile:function(a,b){var c,d;a?c=a.replace(/\|/g,"/"):(c=top.ICEcoder.selectedFiles[top.ICEcoder.selectedFiles.length- 1].replace(/\|/g,"/"),a=top.ICEcoder.selectedFiles[top.ICEcoder.selectedFiles.length-1].replace(/\|/g,"/"));b||(b=top.ICEcoder.getInput(top.t["Please enter the..."],c));b&&(d=top.ICEcoder.openFiles.indexOf(c.replace(/\|/g,"/")),-1', -c=top.ICEcoder.openFiles[d],top.get("tab"+(d+1)).innerHTML=closeTabLink+" "+c.slice(c.lastIndexOf("/")).replace(/\//,""),top.get("tab"+(d+1)).title=b),top.ICEcoder.serverQueue("add","lib/file-control.php?action=rename&file="+b+"&oldFileName="+a.replace(/\|/g,"/")+"&csrf="+top.ICEcoder.csrf),top.ICEcoder.serverMessage(""+top.t["Renaming to"]+"
"+b),top.ICEcoder.setPreviousFiles())},moveFile:function(a,b){var c,d;b&&(d=top.ICEcoder.openFiles.indexOf(a.replace(/\|/g,"/")),-1"+top.t["Renaming to"]+"
"+b),top.ICEcoder.setPreviousFiles())},moveFile:function(a,b){var c,d;b&&(d=top.ICEcoder.openFiles.indexOf(a.replace(/\|/g,"/")),-1',c=top.ICEcoder.openFiles[d],top.get("tab"+(d+1)).innerHTML=closeTabLink+" "+c.slice(c.lastIndexOf("/")).replace(/\//,""),top.get("tab"+(d+1)).title= -b),top.ICEcoder.serverQueue("add","lib/file-control.php?action=move&file="+b+"&oldFileName="+a.replace(/\|/g,"/")+"&csrf="+top.ICEcoder.csrf),top.ICEcoder.serverMessage(""+top.t["Moving to"]+"
"+b),top.ICEcoder.setPreviousFiles())},deleteFiles:function(a){var b;a=a?a:top.ICEcoder.selectedFiles;b=a.toString().replace(/\|/g,"/").replace(/,/g,"\n");0"+top.t["Deleting File"]+"
"+b))},copyFiles:function(a,b,c){top.ICEcoder.copiedFiles=[];for(var d=0;d"+top.t["Pasting File"]+"
"+top.ICEcoder.copiedFiles[b].toString().replace(/\|/g,"/").replace(/,/g,"\n"))):top.ICEcoder.message(top.t["Sorry cannot paste..."]);else top.ICEcoder.message(top.t["Nothing to paste..."])},duplicateFiles:function(a){var b;top.ICEcoder.copiedFiles&&(b=top.ICEcoder.copiedFiles);top.ICEcoder.copyFiles(a,"dontShowPaste","dontHide");a=a[0].substr(0,a[0].lastIndexOf("|")); -top.ICEcoder.pasteFiles(a);"undefined"!=typeof b&&(top.ICEcoder.copiedFiles=b)},uploadFilesSelect:function(a){top.get("uploadDir").value=a;top.get("fileInput").click()},uploadFilesSubmit:function(a){""!=top.get("fileInput").value&&(top.ICEcoder.showHide("show",top.get("loadingMask")),top.get("uploadFilesForm").submit(),event.preventDefault())},showHideFileNav:function(a,b){var c=["optionsFile","optionsEdit","optionsSource","optionsHelp"];if("hide"==a)fileNavInt=setTimeout(function(){for(var a=0;a< -c.length;a++)top.ICEcoder.showHide("hide",top.get(c[a])),top.get(c[a]+"Nav").style.color=""},150);else for(var d=0;d"+top.t["Moving to"]+"
"+b),top.ICEcoder.setPreviousFiles())},deleteFiles:function(a){var b;a=a?a:top.ICEcoder.selectedFiles;b=a.toString().replace(/\|/g,"/").replace(/,/g,"\n");0"+top.t["Deleting File"]+"
"+b))},copyFiles:function(a,b,c){top.ICEcoder.copiedFiles=[];for(var d=0;d"+top.t["Pasting File"]+"
"+top.ICEcoder.copiedFiles[b].toString().replace(/\|/g,"/").replace(/,/g,"\n"))):top.ICEcoder.message(top.t["Sorry cannot paste..."]);else top.ICEcoder.message(top.t["Nothing to paste..."])},duplicateFiles:function(a){var b;top.ICEcoder.copiedFiles&&(b=top.ICEcoder.copiedFiles);top.ICEcoder.copyFiles(a,"dontShowPaste","dontHide");a=a[0].substr(0,a[0].lastIndexOf("|"));top.ICEcoder.pasteFiles(a); +"undefined"!=typeof b&&(top.ICEcoder.copiedFiles=b)},uploadFilesSelect:function(a){top.get("uploadDir").value=a;top.get("fileInput").click()},uploadFilesSubmit:function(a){""!=top.get("fileInput").value&&(top.ICEcoder.showHide("show",top.get("loadingMask")),top.get("uploadFilesForm").submit(),event.preventDefault())},showHideFileNav:function(a,b){var c=["optionsFile","optionsEdit","optionsSource","optionsHelp"];if("hide"==a)fileNavInt=setTimeout(function(){for(var a=0;ac&&(b-=b+a-c),top.get("fileMenu").style.top=b+"px");return!1},showFileMenu:function(){top.get("fileMenu").style.display="inline-block";setTimeout(function(){top.get("fileMenu").style.opacity= "1"},4)},hideFileMenu:function(){top.get("fileMenu").style.display="none";top.get("fileMenu").style.opacity="0"},updateFileManagerList:function(a,b,c,d,f,e,g){var k,h,l,n,p,m,r;if("add"==a&&!top.get("filesFrame").contentWindow.document.getElementById(b.replace(top.iceRoot,"").replace(/\/$/,"").replace(/\//g,"|")+"|"+c)){k="file"==g?"pft-file ext-"+c.substr(c.indexOf(".")+1):"pft-directory";d="file"==g?top.ICEcoder.newFilePerms:top.ICEcoder.newDirPerms;b||(b="/");b=b.replace(top.iceRoot,"/");b=b.replace("//", @@ -78,12 +78,12 @@ a?e.replaceSelection(d,"around"):document.findAndReplace.replaceAction.value==to {line:0,ch:0},!0),b.findNext());e.setSelection(b.from(),b.to());top.ICEcoder.focus();top.ICEcoder.findMode=!0}a=top.ICEcoder.scrollBarVisible?parseInt(top.ICEcoder.content.style.height,10)/e.lineCount():e.defaultTextHeight();b=top.ICEcoder.scrollBarVisible?0:e.heightAtLine(0);f="";for(d=1;d<=e.lineCount();d++)c=-1';top.ICEcoder.content.contentWindow.document.getElementById("resultsBar").innerHTML=f;top.ICEcoder.content.contentWindow.document.getElementById("resultsBar").style.display="inline-block";return!0}f.innerHTML="No results";top.ICEcoder.content.contentWindow.document.getElementById("resultsBar").innerHTML="";top.ICEcoder.content.contentWindow.document.getElementById("resultsBar").style.display="none";return!1}""!=a&&c?(f=b=e="",document.findAndReplace.connector.value== top.t.and&&(e="&replace="+d),0<=document.findAndReplace.target.value.indexOf(top.t.file)&&(b="&target="+document.findAndReplace.target.value.replace(/ /g,"-")),document.findAndReplace.target.value==top.t["selected files"]&&(f="&selectedFiles="+top.ICEcoder.selectedFiles.join(":")),a=a.replace(/\'/g,"'"),a!=encodeURIComponent(a)?a="ICEcoder:"+encodeURIComponent(a):a,top.ICEcoder.showHide("show",top.get("loadingMask")),top.get("mediaContainer").innerHTML=''):(f.innerHTML="No results",top.ICEcoder.content.contentWindow.document.getElementById("resultsBar").innerHTML="",top.ICEcoder.content.contentWindow.document.getElementById("resultsBar").style.display="none")},replaceInFile:function(a,b,c){top.ICEcoder.serverQueue("add","lib/file-control.php?action=replaceText&fileRef="+a.replace(/\//g,"|")+"&find="+b+"&replace="+c+"&csrf="+top.ICEcoder.csrf);top.ICEcoder.serverMessage(""+ -top.t["Replacing text in"]+"
"+a)},getCaretPosition:function(){var a,b,c,d;a=ICEcoder.getcMInstance();b=ICEcoder.getcMdiffInstance();a=-1=a||10<=a)&&top.ICEcoder.mouseX>parseInt(top.ICEcoder.files.style.width,10)&&(top.ICEcoder.tabDragMouseX=top.ICEcoder.mouseX-parseInt(top.ICEcoder.files.style.width,10)-top.ICEcoder.tabDragMouseXStart,top.ICEcoder.tabDragMove());if(top.ICEcoder.ready&&(top.ICEcoder.mouseDown||(top.ICEcoder.draggingFilesW=!1),a=!ICEcoder.draggingTab&&(top.ICEcoder.mouseX>top.ICEcoder.filesW-7&&top.ICEcoder.mouseX'):(f.innerHTML="No results",top.ICEcoder.content.contentWindow.document.getElementById("resultsBar").innerHTML="",top.ICEcoder.content.contentWindow.document.getElementById("resultsBar").style.display="none")},replaceInFile:function(a,b,c){top.ICEcoder.serverQueue("add","lib/file-control-xhr.php?action=replaceText&fileRef="+a.replace(/\//g,"|")+"&find="+b+"&replace="+c+"&csrf="+top.ICEcoder.csrf, +a.replace(/\//g,"|"));top.ICEcoder.serverMessage(""+top.t["Replacing text in"]+"
"+a)},getCaretPosition:function(){var a,b,c,d;a=ICEcoder.getcMInstance();b=ICEcoder.getcMdiffInstance();a=-1=a||10<=a)&&top.ICEcoder.mouseX>parseInt(top.ICEcoder.files.style.width,10)&&(top.ICEcoder.tabDragMouseX=top.ICEcoder.mouseX-parseInt(top.ICEcoder.files.style.width,10)-top.ICEcoder.tabDragMouseXStart,top.ICEcoder.tabDragMove());if(top.ICEcoder.ready&&(top.ICEcoder.mouseDown||(top.ICEcoder.draggingFilesW=!1),a=!ICEcoder.draggingTab&&(top.ICEcoder.mouseX>top.ICEcoder.filesW-7&&top.ICEcoder.mouseX").replace(/\<\/b\>/g,"").replace(/\<br\>/g,"
"),b.style.left="0"):setTimeout(function(){b.style.left="2000px"},200);b.style.opacity=a?1: 0},cssColorPreview:function(){var a,b,c,d;a=ICEcoder.getcMInstance();b=ICEcoder.getcMdiffInstance();if(a=-1d.index+d[0].length;);(b=top.get("content").contentWindow.document.getElementById("cssColor"))&&b.parentNode.removeChild(b);top.ICEcoder.codeAssist&&"CSS"==top.ICEcoder.caretLocType&&(b=top.document.createElement("div"), b.id="cssColor",b.style.position="absolute",b.style.display="block",b.style.width=b.style.height="20px",b.style.zIndex="1000",b.style.background=d?d[0]:"",b.style.cursor="pointer",b.onclick=function(){top.ICEcoder.showColorPicker(d[0])},""==b.style.backgroundColor&&(b.style.display="none"),top.get("header").appendChild(b),a.addWidget(a.getCursor(),top.get("cssColor"),!0))}},showColorPicker:function(a){top.get("blackMask").style.visibility="visible";top.get("mediaContainer").innerHTML='



'; @@ -94,59 +94,60 @@ b.replaceRange(a,{line:b.getCursor().line,ch:c.start},{line:b.getCursor().line,c b+"'",6E4*d):0==c.indexOf("fileControl")?top.ICEcoder["plugTimer"+a]=setInterval(function(){top.ICEcoder.serverQueue("add",b);top.ICEcoder.serverMessage(c.split(":")[1])},6E4*d):top.ICEcoder["plugTimer"+a]=setInterval("window.open('"+b+"','"+c+"')",6E4*d);top.ICEcoder.pluginIntervalRefs.push(a)},codeAssistToggle:function(){var a,b;top.ICEcoder.codeAssist=!top.ICEcoder.codeAssist;top.get("codeAssistDisplay").style.backgroundPosition=top.ICEcoder.codeAssist?"0 0":"-16px 0";top.ICEcoder.cssColorPreview(); top.ICEcoder.focus(-1'+top.t["Cancelled tasks"]+"");setTimeout(function(){top.ICEcoder.serverMessage()},2E3)},setPreviousFiles:function(){var a;a=top.ICEcoder.openFiles.join(",").replace(/\//g,"|").replace(/(\|\[NEW\])|(,\|\[NEW\])/g,"").replace(/(^,)|(,$)/g,"");""==a&&(a="CLEAR");top.ICEcoder.serverQueue("add","lib/settings.php?saveFiles="+a+ -"&csrf="+top.ICEcoder.csrf)},autoOpenFiles:function(){if(0';top.ICEcoder.showHide("show",top.get("blackMask"))},propertiesScreen:function(a){top.get("mediaContainer").innerHTML='';top.ICEcoder.showHide("show",top.get("blackMask"))},pluginsManager:function(){top.get("mediaContainer").innerHTML=''; -top.ICEcoder.showHide("show",top.get("blackMask"))},githubAction:function(a){top.get("mediaContainer").innerHTML='';top.ICEcoder.showHide("show",top.get("blackMask"))},githubTokenAsk:function(a){if(githubAuthToken=top.ICEcoder.getInput(top.t["Please enter your..."],""))top.ICEcoder.filesFrame.contentWindow.frames.fileControl.location.href= -"lib/github.php?action=auth&token="+githubAuthToken+"&goNext="+a+"&csrf="+top.ICEcoder.csrf,githubAuthToken=""},showHideGithubNav:function(a){top.get("githubNav").style.display="show"==a?"block":"none";top.get("fileNav").style.display="show"==a?"none":"block"},githubManager:function(){top.ICEcoder.githubAuthTokenSet?(top.get("mediaContainer").innerHTML='',top.ICEcoder.showHide("show",top.get("blackMask"))): -top.ICEcoder.githubTokenAsk("showManager")},githubDiffToggle:function(){var a;if(!top.ICEcoder.githubAuthTokenSet)top.ICEcoder.githubTokenAsk("loadFiles");else if(top.ICEcoder.githubDiff||top.ICEcoder.ask(top.t["This will compare..."]))top.ICEcoder.githubDiff=!top.ICEcoder.githubDiff,a=top.ICEcoder.githubDiff?"true":"false",top.ICEcoder.filesFrame.src="files.php?githubDiff="+a+"&csrf="+top.ICEcoder.csrf},useNewSettings:function(a,b,c,d,f,e,g,k,h,l,n,p,m,r,s,t,u){var q;top.ICEcoder.theme=a.slice(a.lastIndexOf("/")+ -1,a.lastIndexOf("."));"editor"==top.ICEcoder.theme&&(top.ICEcoder.theme="icecoder");q=document.createElement("link");q.setAttribute("rel","stylesheet");q.setAttribute("type","text/css");q.setAttribute("href",a);top.ICEcoder.content.contentWindow.document.getElementsByTagName("head")[0].appendChild(q);a=-1<"3024-day base16-light eclipse elegant neat paraiso-light solarized xq-light".split(" ").indexOf(top.ICEcoder.theme)?"#ccc":"#000";top.ICEcoder.switchTab(top.ICEcoder.selectedTab);b!=top.ICEcoder.codeAssist&& -(top.get("codeAssist").checked=b,top.ICEcoder.codeAssistToggle());c!=top.ICEcoder.lockedNav&&top.ICEcoder.lockUnlockNav();c||(ICEcoder.changeFilesW("contract"),top.ICEcoder.hideFileMenu());c=ICEcoder.content.contentWindow.document.styleSheets[4];b=c.rules?"rules":"cssRules";c[b][0].style.fontSize=g;c[b][4].style["border-left-width"]=e?"1px":"0";c[b][4].style["margin-left"]=e?"-1px":"0";c[b][2].style.cssText="background-color: "+a+" !important";top.ICEcoder.lineWrapping=k;top.ICEcoder.indentWithTabs= -h;top.ICEcoder.indentSize=l;for(e=0;echMod "+b+" on
"+a.replace(/\|/g,"/"))},openPreviewWindow:function(){if(0< -top.ICEcoder.openFiles.length){var a,b,c,d,f;d=top.ICEcoder.openFiles[top.ICEcoder.selectedTab-1];a=d.substr(d.lastIndexOf("/")+1);f=a.substr(a.lastIndexOf(".")+1);a=ICEcoder.getcMInstance();b=ICEcoder.getcMdiffInstance();c=-1

Click anywhere to continue using ICEcoder...

'},xhrObj:function(){try{return new XMLHttpRequest}catch(a){}try{return new ActiveXObject("Msxml3.XMLHTTP")}catch(b){}try{return new ActiveXObject("Msxml2.XMLHTTP.6.0")}catch(c){}try{return new ActiveXObject("Msxml2.XMLHTTP.3.0")}catch(d){}try{return new ActiveXObject("Msxml2.XMLHTTP")}catch(f){}try{return new ActiveXObject("Microsoft.XMLHTTP")}catch(e){}return null}, -openBugReport:function(){var a;"off"==top.ICEcoder.bugReportStatus&&top.ICEcoder.message(top.t["You can start..."]);"error"==top.ICEcoder.bugReportStatus&&top.ICEcoder.message(top.t["Error cannot find..."]);"ok"==top.ICEcoder.bugReportStatus&&top.ICEcoder.message(top.t["No new errors..."]);"bugs"==top.ICEcoder.bugReportStatus&&(a=top.ICEcoder.openFiles.indexOf(top.ICEcoder.bugReportPath.replace(/\|/g,"/")),-1/g,">").replace(/"/g, -""").replace(/'/g,"'")},printCode:function(){var a,b;a=top.ICEcoder.getcMInstance();b=top.ICEcoder.getcMdiffInstance();a=-1ICEcoder code output
'+top.ICEcoder.xssClean(a.getValue())+"
";b.focus();b.print();a.focus()},indicateChanges:function(){var a; -if(!top.ICEcoder.loadingFile){a="ICEcoder v "+top.ICEcoder.versionNo;for(var b=1;b<=top.ICEcoder.savedPoints.length;b++)if(top.ICEcoder.savedPoints[b-1]!=top.ICEcoder.getcMInstance(b).changeGeneration()){a+=" \u2744";break}top.document.title=a}},switchTab:function(a,b){var c,d;ICEcoder.selectedTab=a;c=ICEcoder.getcMInstance();d=ICEcoder.getcMdiffInstance();if(-1 '+b.slice(b.lastIndexOf("/")).replace(/\//, -"");top.get("tab"+top.ICEcoder.openFiles.length).title="/"+top.ICEcoder.openFiles[top.ICEcoder.openFiles.length-1].replace(/\//,"");top.ICEcoder.setTabWidths();top.ICEcoder.redoTabHighlight(top.ICEcoder.openFiles.length);top.ICEcoder.selectedTab=top.ICEcoder.openFiles.length;top.ICEcoder.savedPoints.push(0);a||top.ICEcoder.setPreviousFiles()},nextTab:function(){top.ICEcoder.switchTab(top.ICEcoder.selectedTab+1<=top.ICEcoder.openFiles.length?top.ICEcoder.selectedTab+1:1,"noFocus")},previousTab:function(){top.ICEcoder.switchTab(1<= -top.ICEcoder.selectedTab-1?top.ICEcoder.selectedTab-1:top.ICEcoder.openFiles.length,"noFocus")},renameTab:function(a,b){var c;top.ICEcoder.openFiles[a-1]=b;c=top.ICEcoder.openFiles[a-1];top.get("tab"+a).innerHTML=' '+ -c.slice(c.lastIndexOf("/")).replace(/\//,"");top.get("tab"+a).title="/"+top.ICEcoder.openFiles[a-1].replace(/\//,"")},redoTabHighlight:function(a){for(var b,c,d=1;d<=ICEcoder.savedPoints.length;d++)top.get("tab"+d).childNodes[0]&&(top.get("tab"+d).childNodes[0].childNodes[0].style.backgroundColor=ICEcoder.savedPoints[d-1]!=top.ICEcoder.getcMInstance(d).changeGeneration()?"#b00":"transparent"),b=d==a?top.ICEcoder.tabFGselected:top.ICEcoder.tabFGnormalTab,"undefined"!=typeof top.ICEcoder.openFiles[d- -1]&&"/[NEW]"!=top.ICEcoder.openFiles[d-1]&&(c=top.ICEcoder.filesFrame.contentWindow.document.getElementById(top.ICEcoder.openFiles[d-1].replace(/\//g,"|")))&&(c.style.backgroundColor=d==a?top.ICEcoder.tabBGcurrent:top.ICEcoder.tabBGopen,c.style.color=d==a?top.ICEcoder.tabFGcurrent:top.ICEcoder.tabFGopenFile),top.get("tab"+d).style.color=b,top.get("tab"+d).style.background=d==a?top.ICEcoder.tabBGcurrent:top.ICEcoder.tabBGopen},closeTab:function(a,b,c){var d;a||(a=top.ICEcoder.selectedTab);ICEcoder.getcMInstance(); -ICEcoder.getcMdiffInstance();d=!0;c||ICEcoder.savedPoints[a-1]==top.ICEcoder.getcMInstance(a).changeGeneration()||(d=top.ICEcoder.ask(top.t["You have made..."]));if(d){c=top.ICEcoder.openFiles[a-1];for(d=a;db?parseInt(c*g,10)-parseInt(c*(g-1),10):150,f=0==g?53:parseInt(top.get("tab"+g).style.left,10),e=0==g?0:parseInt(top.get("tab"+g).style.width,10)+18,a?d=-18:(top.get("tab"+(g+1)).style.left=f+e+"px",top.get("tab"+(g+1)).style.width=d+"px"),top.ICEcoder.tabLeftPos.push(f+e);top.get("newTab").style.left=f+e+d+18+"px"}},tabDragStart:function(a){top.ICEcoder.draggingTab=a;top.ICEcoder.diffStartX= -top.ICEcoder.mouseX;top.ICEcoder.tabDragMouseXStart=(top.ICEcoder.mouseX-(parseInt(top.ICEcoder.files.style.width,10)+53+18))%150;top.get("tab"+a).style.zIndex=2;for(var b=1;b<=top.ICEcoder.openFiles.length;b++)top.get("tab"+b).className=b!==a?"tab tabSlide":"tab tabDrag"},tabDragMove:function(){var a,b;a=parseInt(top.get("tab"+top.ICEcoder.openFiles.length).style.width,10)+18;top.ICEcoder.thisLeft=a=53<=top.ICEcoder.tabDragMouseX?top.ICEcoder.tabDragMouseX<=parseInt(top.get("newTab").style.left, -10)-a?top.ICEcoder.tabDragMouseX:parseInt(top.get("newTab").style.left,10)-a:53;top.get("tab"+top.ICEcoder.draggingTab).style.left=a+"px";top.ICEcoder.dragTabNo=top.ICEcoder.draggingTab;for(var c=1;c<=top.ICEcoder.openFiles.length;c++)top.get("tab"+c).style.opacity=c==top.ICEcoder.draggingTab?1:.5,b=top.ICEcoder.tabLeftPos[c]?top.ICEcoder.tabLeftPos[c]-top.ICEcoder.tabLeftPos[c-1]:b,c!=top.ICEcoder.draggingTab&&(c=top.ICEcoder.tabLeftPos[c-1]?top.ICEcoder.tabLeftPos[c-1]-b:top.ICEcoder.tabLeftPos[c-1])},tabDragEnd:function(){var a,b;top.ICEcoder.setTabWidths();for(var c=1;c<=top.ICEcoder.openFiles.length;c++)top.ICEcoder.thisLeft>=top.ICEcoder.tabLeftPos[c-1]&&(a=top.ICEcoder.thisLeft==top.ICEcoder.tabLeftPos[0]?1:top.ICEcoder.dragTabNo>c?c+1:c),top.get("tab"+c).className="tab",top.get("tab"+c).style.opacity=1,c!=top.ICEcoder.dragTabNo? -top.get("tab"+c).style.zIndex=1:setTimeout(function(){top.get("tab"+c).style.zIndex=1},150);if(top.ICEcoder.thisLeft&&!1!==top.ICEcoder.thisLeft){b=[];for(c=1;c<=top.ICEcoder.openFiles.length;c++)b.push(c);b.splice(top.ICEcoder.dragTabNo-1,1);b.splice(a-1,0,top.ICEcoder.dragTabNo);ICEcoder.sortTabs(b)}top.ICEcoder.setTabWidths();top.ICEcoder.draggingTab=!1;top.ICEcoder.thisLeft=!1},sortTabs:function(a){var b,c,d;b=[ICEcoder.savedPoints,ICEcoder.openFiles,ICEcoder.openFileMDTs,ICEcoder.cMInstances]; -c=[[],[],[],[]];for(var f=0;f'+top.t["Cancelled tasks"]+"");setTimeout(function(){top.ICEcoder.serverMessage()},2E3)},setPreviousFiles:function(){var a;a=top.ICEcoder.openFiles.join(",").replace(/\//g,"|").replace(/(\|\[NEW\])|(,\|\[NEW\])/g, +"").replace(/(^,)|(,$)/g,"");""==a&&(a="CLEAR");top.ICEcoder.serverQueue("add","lib/settings.php?saveFiles="+a+"&csrf="+top.ICEcoder.csrf)},autoOpenFiles:function(){if(0';top.ICEcoder.showHide("show",top.get("blackMask"))},propertiesScreen:function(a){top.get("mediaContainer").innerHTML='';top.ICEcoder.showHide("show", +top.get("blackMask"))},pluginsManager:function(){top.get("mediaContainer").innerHTML='';top.ICEcoder.showHide("show",top.get("blackMask"))},githubAction:function(a){top.get("mediaContainer").innerHTML='';top.ICEcoder.showHide("show", +top.get("blackMask"))},githubTokenAsk:function(a){if(githubAuthToken=top.ICEcoder.getInput(top.t["Please enter your..."],""))top.ICEcoder.filesFrame.contentWindow.frames.fileControl.location.href="lib/github.php?action=auth&token="+githubAuthToken+"&goNext="+a+"&csrf="+top.ICEcoder.csrf,githubAuthToken=""},showHideGithubNav:function(a){top.get("githubNav").style.display="show"==a?"block":"none";top.get("fileNav").style.display="show"==a?"none":"block"},githubManager:function(){top.ICEcoder.githubAuthTokenSet? +(top.get("mediaContainer").innerHTML='',top.ICEcoder.showHide("show",top.get("blackMask"))):top.ICEcoder.githubTokenAsk("showManager")},githubDiffToggle:function(){var a;if(!top.ICEcoder.githubAuthTokenSet)top.ICEcoder.githubTokenAsk("loadFiles");else if(top.ICEcoder.githubDiff||top.ICEcoder.ask(top.t["This will compare..."]))top.ICEcoder.githubDiff=!top.ICEcoder.githubDiff,a=top.ICEcoder.githubDiff? +"true":"false",top.ICEcoder.filesFrame.src="files.php?githubDiff="+a+"&csrf="+top.ICEcoder.csrf},useNewSettings:function(a,b,c,d,f,e,g,k,h,l,n,p,m,r,t,u,v){var q;top.ICEcoder.theme=a.slice(a.lastIndexOf("/")+1,a.lastIndexOf("."));"editor"==top.ICEcoder.theme&&(top.ICEcoder.theme="icecoder");q=document.createElement("link");q.setAttribute("rel","stylesheet");q.setAttribute("type","text/css");q.setAttribute("href",a);top.ICEcoder.content.contentWindow.document.getElementsByTagName("head")[0].appendChild(q); +a=-1<"3024-day base16-light eclipse elegant neat paraiso-light solarized xq-light".split(" ").indexOf(top.ICEcoder.theme)?"#ccc":"#000";top.ICEcoder.switchTab(top.ICEcoder.selectedTab);b!=top.ICEcoder.codeAssist&&(top.get("codeAssist").checked=b,top.ICEcoder.codeAssistToggle());c!=top.ICEcoder.lockedNav&&top.ICEcoder.lockUnlockNav();c||(ICEcoder.changeFilesW("contract"),top.ICEcoder.hideFileMenu());c=ICEcoder.content.contentWindow.document.styleSheets[4];b=c.rules?"rules":"cssRules";c[b][0].style.fontSize= +g;c[b][4].style["border-left-width"]=e?"1px":"0";c[b][4].style["margin-left"]=e?"-1px":"0";c[b][2].style.cssText="background-color: "+a+" !important";top.ICEcoder.lineWrapping=k;top.ICEcoder.indentWithTabs=h;top.ICEcoder.indentSize=l;for(e=0;echMod "+b+" on
"+a.replace(/\|/g,"/"))},openPreviewWindow:function(){if(0

Click anywhere to continue using ICEcoder...

'},xhrObj:function(){try{return new XMLHttpRequest}catch(a){}try{return new ActiveXObject("Msxml3.XMLHTTP")}catch(b){}try{return new ActiveXObject("Msxml2.XMLHTTP.6.0")}catch(c){}try{return new ActiveXObject("Msxml2.XMLHTTP.3.0")}catch(d){}try{return new ActiveXObject("Msxml2.XMLHTTP")}catch(f){}try{return new ActiveXObject("Microsoft.XMLHTTP")}catch(e){}return null},openBugReport:function(){var a; +"off"==top.ICEcoder.bugReportStatus&&top.ICEcoder.message(top.t["You can start..."]);"error"==top.ICEcoder.bugReportStatus&&top.ICEcoder.message(top.t["Error cannot find..."]);"ok"==top.ICEcoder.bugReportStatus&&top.ICEcoder.message(top.t["No new errors..."]);"bugs"==top.ICEcoder.bugReportStatus&&(a=top.ICEcoder.openFiles.indexOf(top.ICEcoder.bugReportPath.replace(/\|/g,"/")),-1/g,">").replace(/"/g,""").replace(/'/g,"'")},printCode:function(){var a, +b;a=top.ICEcoder.getcMInstance();b=top.ICEcoder.getcMdiffInstance();a=-1ICEcoder code output
'+top.ICEcoder.xssClean(a.getValue())+"
";b.focus();b.print();a.focus()},indicateChanges:function(){var a;if(!top.ICEcoder.loadingFile){a="ICEcoder v "+top.ICEcoder.versionNo; +for(var b=1;b<=top.ICEcoder.savedPoints.length;b++)if(top.ICEcoder.savedPoints[b-1]!=top.ICEcoder.getcMInstance(b).changeGeneration()){a+=" \u2744";break}top.document.title=a}},switchTab:function(a,b){var c,d;ICEcoder.selectedTab=a;c=ICEcoder.getcMInstance();d=ICEcoder.getcMdiffInstance();if(-1 '+b.slice(b.lastIndexOf("/")).replace(/\//,"");top.get("tab"+top.ICEcoder.openFiles.length).title="/"+top.ICEcoder.openFiles[top.ICEcoder.openFiles.length-1].replace(/\//, +"");top.ICEcoder.setTabWidths();top.ICEcoder.redoTabHighlight(top.ICEcoder.openFiles.length);top.ICEcoder.selectedTab=top.ICEcoder.openFiles.length;top.ICEcoder.savedPoints.push(0);a||top.ICEcoder.setPreviousFiles()},nextTab:function(){top.ICEcoder.switchTab(top.ICEcoder.selectedTab+1<=top.ICEcoder.openFiles.length?top.ICEcoder.selectedTab+1:1,"noFocus")},previousTab:function(){top.ICEcoder.switchTab(1<=top.ICEcoder.selectedTab-1?top.ICEcoder.selectedTab-1:top.ICEcoder.openFiles.length,"noFocus")}, +renameTab:function(a,b){var c;top.ICEcoder.openFiles[a-1]=b;c=top.ICEcoder.openFiles[a-1];top.get("tab"+a).innerHTML=' '+c.slice(c.lastIndexOf("/")).replace(/\//,""); +top.get("tab"+a).title="/"+top.ICEcoder.openFiles[a-1].replace(/\//,"")},redoTabHighlight:function(a){for(var b,c,d=1;d<=ICEcoder.savedPoints.length;d++)top.get("tab"+d).childNodes[0]&&(top.get("tab"+d).childNodes[0].childNodes[0].style.backgroundColor=ICEcoder.savedPoints[d-1]!=top.ICEcoder.getcMInstance(d).changeGeneration()?"#b00":"transparent"),b=d==a?top.ICEcoder.tabFGselected:top.ICEcoder.tabFGnormalTab,"undefined"!=typeof top.ICEcoder.openFiles[d-1]&&"/[NEW]"!=top.ICEcoder.openFiles[d-1]&& +(c=top.ICEcoder.filesFrame.contentWindow.document.getElementById(top.ICEcoder.openFiles[d-1].replace(/\//g,"|")))&&(c.style.backgroundColor=d==a?top.ICEcoder.tabBGcurrent:top.ICEcoder.tabBGopen,c.style.color=d==a?top.ICEcoder.tabFGcurrent:top.ICEcoder.tabFGopenFile),top.get("tab"+d).style.color=b,top.get("tab"+d).style.background=d==a?top.ICEcoder.tabBGcurrent:top.ICEcoder.tabBGopen},closeTab:function(a,b,c){var d;a||(a=top.ICEcoder.selectedTab);ICEcoder.getcMInstance();ICEcoder.getcMdiffInstance(); +d=!0;c||ICEcoder.savedPoints[a-1]==top.ICEcoder.getcMInstance(a).changeGeneration()||(d=top.ICEcoder.ask(top.t["You have made..."]));if(d){c=top.ICEcoder.openFiles[a-1];for(d=a;db?parseInt(c*g,10)-parseInt(c*(g-1),10):150,f=0==g?53:parseInt(top.get("tab"+g).style.left,10),e=0==g?0:parseInt(top.get("tab"+g).style.width,10)+18,a?d=-18:(top.get("tab"+(g+1)).style.left=f+e+"px",top.get("tab"+(g+1)).style.width=d+"px"),top.ICEcoder.tabLeftPos.push(f+e);top.get("newTab").style.left=f+e+d+18+"px"}},tabDragStart:function(a){top.ICEcoder.draggingTab=a;top.ICEcoder.diffStartX=top.ICEcoder.mouseX;top.ICEcoder.tabDragMouseXStart= +(top.ICEcoder.mouseX-(parseInt(top.ICEcoder.files.style.width,10)+53+18))%150;top.get("tab"+a).style.zIndex=2;for(var b=1;b<=top.ICEcoder.openFiles.length;b++)top.get("tab"+b).className=b!==a?"tab tabSlide":"tab tabDrag"},tabDragMove:function(){var a,b;a=parseInt(top.get("tab"+top.ICEcoder.openFiles.length).style.width,10)+18;top.ICEcoder.thisLeft=a=53<=top.ICEcoder.tabDragMouseX?top.ICEcoder.tabDragMouseX<=parseInt(top.get("newTab").style.left,10)-a?top.ICEcoder.tabDragMouseX:parseInt(top.get("newTab").style.left, +10)-a:53;top.get("tab"+top.ICEcoder.draggingTab).style.left=a+"px";top.ICEcoder.dragTabNo=top.ICEcoder.draggingTab;for(var c=1;c<=top.ICEcoder.openFiles.length;c++)top.get("tab"+c).style.opacity=c==top.ICEcoder.draggingTab?1:.5,b=top.ICEcoder.tabLeftPos[c]?top.ICEcoder.tabLeftPos[c]-top.ICEcoder.tabLeftPos[c-1]:b,c!=top.ICEcoder.draggingTab&&(c=top.ICEcoder.tabLeftPos[c-1]?top.ICEcoder.tabLeftPos[c-1]-b:top.ICEcoder.tabLeftPos[c-1])},tabDragEnd:function(){var a,b;top.ICEcoder.setTabWidths();for(var c=1;c<=top.ICEcoder.openFiles.length;c++)top.ICEcoder.thisLeft>=top.ICEcoder.tabLeftPos[c-1]&&(a=top.ICEcoder.thisLeft==top.ICEcoder.tabLeftPos[0]?1:top.ICEcoder.dragTabNo>c?c+1:c),top.get("tab"+c).className="tab",top.get("tab"+c).style.opacity=1,c!=top.ICEcoder.dragTabNo?top.get("tab"+c).style.zIndex=1:setTimeout(function(){top.get("tab"+ +c).style.zIndex=1},150);if(top.ICEcoder.thisLeft&&!1!==top.ICEcoder.thisLeft){b=[];for(c=1;c<=top.ICEcoder.openFiles.length;c++)b.push(c);b.splice(top.ICEcoder.dragTabNo-1,1);b.splice(a-1,0,top.ICEcoder.dragTabNo);ICEcoder.sortTabs(b)}top.ICEcoder.setTabWidths();top.ICEcoder.draggingTab=!1;top.ICEcoder.thisLeft=!1},sortTabs:function(a){var b,c,d;b=[ICEcoder.savedPoints,ICEcoder.openFiles,ICEcoder.openFileMDTs,ICEcoder.cMInstances];c=[[],[],[],[]];for(var f=0;f