Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions .eslintrc.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,9 @@ rules:
comma-spacing:
- 2
- {before: false, after: true}
keyword-spacing:
- 2
- {before: true, after: true}
no-trailing-spaces: 2
indent:
- 2
Expand Down
2 changes: 1 addition & 1 deletion Applications/Games/League of Legends/Online/script.js
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ new CustomInstallerScript()
var selectedRegion = wizard.menu(tr("Select your region:"), regions);
var regionID, url, sha1;
var baseUrl = "https://riotgamespatcher-a.akamaihd.net/ShellInstaller/";
switch(selectedRegion.text){
switch (selectedRegion.text){
case "EU West":
regionID = "EUW";
url = baseUrl+"EUW/LeagueofLegends_EUW_Installer_2016_11_10.exe";
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ new LocalInstallerScript()
var exeName, url, sha1;
var originDirectory = wine.prefixDirectory + "drive_c/users/Public/Documents/";

switch(selectedRegion.text){
switch (selectedRegion.text){
case "France":
exeName = "RVSPatch_1.0_To_1.60_FRA.exe";
url = "http://ftp.ubi.com/us/games/ravenshield/RVSPatch_1.0_To_1.60_FRA.exe";
Expand Down
6 changes: 3 additions & 3 deletions Engines/Wine/Engine/Object/script.js
Original file line number Diff line number Diff line change
Expand Up @@ -201,11 +201,11 @@ Wine.prototype.run = function (executable, args, captureOutput) {

var extensionFile = executable.split(".").pop();

if(extensionFile == "msi") {
if (extensionFile == "msi") {
return this.run("msiexec", ["/i", executable].concat(args), captureOutput);
}

if(extensionFile == "bat") {
if (extensionFile == "bat") {
return this.run("start", ["/Unix", executable].concat(args), captureOutput);
}

Expand Down Expand Up @@ -849,7 +849,7 @@ Wine.prototype.windowsVersion = function (version, servicePack) {
"[HKEY_CURRENT_USER\\Software\\Wine]\n" +
"\"Version\"=\"" + version + "\"\n";

if(servicePack) {
if (servicePack) {
var servicePackNumber = servicePack.replace("sp", "");
that._regeditFileContent += "[HKEY_LOCAL_MACHINE\\Software\\Microsoft\\Windows NT\\CurrentVersion]";
that._regeditFileContent += "\"CSDVersion\"=\"Service Pack "+ servicePackNumber +"\"";
Expand Down
2 changes: 1 addition & 1 deletion Engines/Wine/QuickScript/Quick Script/script.js
Original file line number Diff line number Diff line change
Expand Up @@ -125,7 +125,7 @@ QuickScript.prototype._createShortcut = function(prefix) {
.search(this._executable)
.arguments(this._executableArgs);

if(this.miniature().isPresent()) {
if (this.miniature().isPresent()) {
shortcut.miniature(this.miniature().get())
}
shortcut.create();
Expand Down
8 changes: 4 additions & 4 deletions Engines/Wine/Shortcuts/Reader/script.js
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ var _WineShortcutReader = function(shortcut) {
this.run = function(userArguments) {
var shortcutContent = JSON.parse(this.shortcut.script);

if(!userArguments) {
if (!userArguments) {
userArguments = [];
}

Expand Down Expand Up @@ -50,15 +50,15 @@ var _WineShortcutReader = function(shortcut) {
shortcutCategory.getShortcuts().forEach(function(shortcut) {
var _otherShortcutContent = JSON.parse(shortcut.script);

if(_otherShortcutContent.winePrefix == _winePrefix && shortcut.name != that.shortcut.name) {
if (_otherShortcutContent.winePrefix == _winePrefix && shortcut.name != that.shortcut.name) {
_found = true;
}
});
});

this._shortcutManager.deleteShortcut(this.shortcut);

if(!_found) {
if (!_found) {
this._uiQuestionFactory.create(tr("The container {0} is no longer used.\nDo you want to delete it?", _winePrefix),
function() {
remove(that._winePrefixesDirectory + _winePrefix);
Expand All @@ -83,7 +83,7 @@ ShortcutReader.prototype.of = function (shortcut) {
this.shortcut = shortcut;
var shortcutContentParsed = JSON.parse(this.shortcut.script);

if(shortcutContentParsed.type == "WINE") {
if (shortcutContentParsed.type == "WINE") {
this._runner = new _WineShortcutReader(this.shortcut);
}
}
Expand Down
6 changes: 3 additions & 3 deletions Engines/Wine/Shortcuts/Wine/script.js
Original file line number Diff line number Diff line change
Expand Up @@ -93,10 +93,10 @@ WineShortcut.prototype.prefix = function (prefix) {
* @returns {WineShortcut} WineShortcut object
*/
WineShortcut.prototype.miniature = function (miniature) {
if(isArray(miniature)) {
if (isArray(miniature)) {
// application of miniature given
var application = this._appsManager.getApplication(miniature);
if(application != null && application.getMainMiniature().isPresent()) {
if (application != null && application.getMainMiniature().isPresent()) {
this._miniature = application.getMainMiniature().get();
}
} else {
Expand Down Expand Up @@ -138,7 +138,7 @@ WineShortcut.prototype.create = function () {
executable: executables[0].getAbsolutePath()
}));

if(this._miniature) {
if (this._miniature) {
builder.withMiniature(this._miniature);
}

Expand Down
2 changes: 1 addition & 1 deletion Engines/Wine/Verbs/dotnet45/script.js
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ Wine.prototype.dotnet45 = function() {

this.windowsVersion(OSVersion);

if(OSVersion != "win2003") {
if (OSVersion != "win2003") {
print(tr("{0} applications can have issues when windows version is not set to \"win2003\"", ".NET 4.5"));
}

Expand Down
2 changes: 1 addition & 1 deletion Engines/Wine/Verbs/dotnet452/script.js
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ Wine.prototype.dotnet452 = function() {

this.windowsVersion(OSVersion);

if(OSVersion != "win2003") {
if (OSVersion != "win2003") {
print(tr("{0} applications can have issues when windows version is not set to \"win2003\"", ".NET 4.5.2"));
}

Expand Down
2 changes: 1 addition & 1 deletion Utils/Functions/Apps/Resources/script.js
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ AppResource.prototype.get = function (resourceName) {
var foundResource = null;
if (application != null && application.resources != null) {
application.resources.forEach(function(resource) {
if(resource.name == resourceName) {
if (resource.name == resourceName) {
foundResource = resource.content;
}
});
Expand Down
4 changes: 2 additions & 2 deletions Utils/Functions/Filesystem/Extract/script.js
Original file line number Diff line number Diff line change
Expand Up @@ -57,12 +57,12 @@ CabExtract.prototype.extract = function (args) {
this._progressMessage = tr("Please wait while {0} is extracted ...", this._archive);
}

if(this._wizard) {
if (this._wizard) {
var progressBar = this._wizard.progressBar(this._progressMessage);
}

var processArguments;
if(args) {
if (args) {
processArguments = ["cabextract"].concat(args).concat([this._archive]);
} else {
processArguments = ["cabextract", this._archive];
Expand Down
4 changes: 2 additions & 2 deletions Utils/Functions/Filesystem/Files/script.js
Original file line number Diff line number Diff line change
Expand Up @@ -150,12 +150,12 @@ Checksum.prototype.of = function (file) {
* @returns {string} calculated checksum
*/
Checksum.prototype.get = function () {
if(this._wizard) {
if (this._wizard) {
var progressBar = this._wizard.progressBar(tr("Checking file consistency ..."));
}

return this._checksumCalculator.calculate(this._file, this._method, function (progressEntity) {
if(progressBar) {
if (progressBar) {
progressBar.accept(progressEntity);
}
});
Expand Down
2 changes: 1 addition & 1 deletion Utils/Functions/Net/Download/script.js
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,7 @@ Downloader.prototype.get = function () {
this._message = tr("Please wait while {0} is downloaded ...", this._fetchFileNameFromUrl(this._url));
}

if(this._wizard) {
if (this._wizard) {
var progressBar = this._wizard.progressBar(this._message);
}

Expand Down
2 changes: 1 addition & 1 deletion Utils/Functions/Net/Resource/script.js
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,7 @@ Resource.prototype.get = function () {
.method(this._algorithm)
.get();

if(fileChecksum == this._checksum) {
if (fileChecksum == this._checksum) {
return resourcePath;
}
}
Expand Down