Skip to content

TagSpaces is an offline, open source, document manager with tagging support

checkstyle

Borislav Sapundzhiev96304effa132
diff --git a/data/cordova/cordova.api.js b/data/cordova/cordova.api.js
index c9d7556bb..b007dacae 100644
--- a/data/cordova/cordova.api.js
+++ b/data/cordova/cordova.api.js
@@ -270,12 +270,14 @@ define(function(require, exports, module) {
function getFilePromise(filePath, resolvePath) {
return new Promise(function(resolve, reject) {
- if(resolvePath) {
+ if (resolvePath) {
getFileSystemPromise(resolvePath).then(function(resfs) {
resfs.getFile(filePath, {create: false},
function(fileEntry) {
fileEntry.file(resolve, reject);
- }, reject);
+ },
+ reject
+ );
}).catch(reject);
} else {
getFile(filePath, resolve, reject);
@@ -294,7 +296,7 @@ define(function(require, exports, module) {
reader.onload = function() {
resolve(reader.result);
};
- if(type === "text") {
+ if (type === "text") {
reader.readAsText(file);
} else {
reader.readAsArrayBuffer(file);
@@ -533,7 +535,7 @@ define(function(require, exports, module) {
pendingCallbacks--;
console.log("File: " + entry.name + " Size: " + entry.size + " i:" + i + " Callb: " + pendingCallbacks);
if (pendingCallbacks === 0 && i === entries.length) {
- if(callback) {
+ if (callback) {
callback(anotatedDirList);
} else {
TSPOSTIO.listDirectory(anotatedDirList);
@@ -545,7 +547,7 @@ define(function(require, exports, module) {
console.error("listDirectory error: " + JSON.stringify(error));
pendingCallbacks--;
if (pendingCallbacks === 0 && i === entries.length) {
- if(callback) {
+ if (callback) {
callback(anotatedDirList);
} else {
TSPOSTIO.listDirectory(anotatedDirList);
@@ -564,7 +566,7 @@ define(function(require, exports, module) {
});
console.log("Dir: " + entries[i].name + " I:" + i + " Callb: " + pendingCallbacks);
if ((pendingCallbacks === 0) && ((i + 1) == entries.length)) {
- if(callback) {
+ if (callback) {
callback(anotatedDirList);
} else {
TSPOSTIO.listDirectory(anotatedDirList);
@@ -573,7 +575,7 @@ define(function(require, exports, module) {
}
}
if (pendingCallbacks === 0) {
- if(callback) {
+ if (callback) {
callback(anotatedDirList);
} else {
TSPOSTIO.listDirectory(anotatedDirList);
@@ -585,7 +587,7 @@ define(function(require, exports, module) {
TSCORE.hideLoadingAnimation();
TSPOSTIO.errorOpeningPath(dirPath);
console.error("Dir List Error: " + error.code);
- if(callback) {
+ if (callback) {
callback(anotatedDirList);
}
}
@@ -595,7 +597,7 @@ define(function(require, exports, module) {
TSCORE.hideLoadingAnimation();
TSPOSTIO.errorOpeningPath(dirPath);
console.error("Getting dir: " + dirPath + " failed with error code: " + error.code);
- if(callback) {
+ if (callback) {
callback(anotatedDirList);
}
}
diff --git a/data/js/extension.manager.js b/data/js/extension.manager.js
index 174ad1045..28b929df4 100644
--- a/data/js/extension.manager.js
+++ b/data/js/extension.manager.js
@@ -7,7 +7,7 @@ define(function(require, exports, module) {
function getExtFolderPath() {
var extPath = "ext";
- if(isCordova) {
+ if (isCordova) {
return location.href.replace(/index.html/gi, extPath);
}
return location.href.replace(/file:\/\//gi, "").replace(/index.html/gi, extPath);