diff --git a/assets/js/icecoder.js b/assets/js/icecoder.js
index 04ee22d..149eb80 100644
--- a/assets/js/icecoder.js
+++ b/assets/js/icecoder.js
@@ -3819,40 +3819,42 @@ var ICEcoder = {
// Pass target file/folder to Zip It!
zipIt: function(tgt) {
- tgt=tgt.replace(/\//g,"|");
- this.filesFrame.contentWindow.frames['fileControl'].location.href="plugins/zip-it/index.php?zip="+tgt+"&csrf="+this.csrf;
+ tgt=tgt.replace(/\//g, "|");
+ this.filesFrame.contentWindow.frames['fileControl'].location.href = iceLoc + "/plugins/zip-it/index.php?zip=" + tgt + "&csrf=" + this.csrf;
},
// Prompt to download our file
downloadFile: function(file) {
- file=file.replace(/\//g,"|");
- this.filesFrame.contentWindow.frames['fileControl'].location.href=iceLoc+"/lib/download.php?file="+file+"&csrf="+this.csrf;
+ file=file.replace(/\//g, "|");
+ this.filesFrame.contentWindow.frames['fileControl'].location.href = iceLoc + "/lib/download.php?file=" + file + "&csrf=" + this.csrf;
},
// Change permissions on a file/folder
- chmod: function(file,perms) {
- file = file.replace(iceRoot,"");
- this.showHide('hide',get('blackMask'));
- this.serverQueue("add",iceLoc+"/lib/file-control.php?action=perms&perms="+perms+"&csrf="+this.csrf,encodeURIComponent(file));
- this.serverMessage('chMod '+perms+' on '+file.replace(/\|/g,"/").replace(/^\/|/g, ''));
+ chmod: function(file, perms) {
+ file = file.replace(iceRoot, "");
+ this.showHide('hide', get('blackMask'));
+ this.serverQueue("add", iceLoc + "/lib/file-control.php?action=perms&perms=" + perms + "&csrf=" + this.csrf, encodeURIComponent(file));
+ this.serverMessage('chMod ' + perms + ' on ' + file.replace(/\|/g, "/").replace(/^\/|/g, ""));
},
// Open/show the preview window
openPreviewWindow: function() {
- if (this.openFiles.length>0) {
- var filepath, filename, fileExt;
+ if (0 < this.openFiles.length) {
+ let filepath, filename, fileExt;
- filepath = this.openFiles[this.selectedTab-1];
- filename = filepath.substr(filepath.lastIndexOf("/")+1);
- fileExt = filename.substr(filename.lastIndexOf(".")+1);
+ filepath = this.openFiles[this.selectedTab - 1];
+ filename = filepath.substr(filepath.lastIndexOf("/") + 1);
+ fileExt = filename.substr(filename.lastIndexOf(".") + 1);
this.previewWindowLoading = true;
- this.previewWindow = window.open(filepath,"previewWindow",500,500);
- if (["md"].indexOf(fileExt) > -1) {
+ this.previewWindow = window.open(filepath, "previewWindow", 500, 500);
+ if (-1 < ["md"].indexOf(fileExt)) {
this.previewWindow.addEventListener('load', function(ic, content) {
ic.previewWindowLoading = false;
ic.previewWindow.document.documentElement.innerHTML = ""
- setTimeout(function() {ic.previewWindow.document.documentElement.innerHTML = content}, 100);
+ setTimeout(function() {
+ ic.previewWindow.document.documentElement.innerHTML = content;
+ }, 100);
}(ic, mmd(ic.getThisCM().getValue())), false);
} else {
this.previewWindow.onload = function() {
@@ -3870,20 +3872,20 @@ var ICEcoder = {
// Reset auto-logout timer
resetAutoLogoutTimer: function() {
- if(this.autoLogoutMins > 1 && this.autoLogoutTimer > (this.autoLogoutMins*60)-60) {
- this.showHide('hide',get('blackMask'));
+ if (1 < this.autoLogoutMins && this.autoLogoutTimer > (this.autoLogoutMins * 60) - 60) {
+ this.showHide('hide', get('blackMask'));
}
this.autoLogoutTimer = 0;
},
// Logout of ICEcoder
logout: function(type) {
- window.location = window.location + "?logout&"+(type ? "type="+type+"&" : "")+"csrf="+this.csrf;
+ window.location = window.location + "?logout&" + (type ? "type=" + type + "&" : "") + "csrf=" + this.csrf;
},
// Show a message
outputMsg: function(msg) {
- var output = this.output.innerHTML;
+ let output = this.output.innerHTML;
// If only placeholder, clear that
if ("Output
via ICEcoder.output(message);
" === output) {
output = "";
@@ -3902,13 +3904,13 @@ var ICEcoder = {
},
// Get the users input
- getInput: function(question,defaultValue) {
- return prompt(question,defaultValue);
+ getInput: function(question, defaultValue) {
+ return prompt(question, defaultValue);
},
// Show a data screen message
dataMessage: function(message) {
- var dM;
+ let dM;
dM = this.content.contentWindow.document.getElementById('dataMessage');
dM.style.display = "block";
@@ -3917,47 +3919,39 @@ var ICEcoder = {
// Update ICEcoder
// update: function() {
- // var autoUpdate;
- //
- // autoUpdate = confirm(t['Please note for...']);
- // if (autoUpdate) {
- // this.showHide('show',get('loadingMask'));
- // window.location = iceLoc+"/lib/updater.php";
+ // if (true == confirm(t['Please note for...'])) {
+ // this.showHide('show', get('loadingMask'));
+ // window.location = iceLoc + "/lib/updater.php";
// } else {
- // window.open("https://this.net");
+ // window.open("https://icecoder.net");
// }
// },
// ICEcoder just updated
updated: function() {
get('blackMask').style.visibility = "visible";
- get('mediaContainer').innerHTML = '