Skip to content

Commit

Permalink
Updated devDependencies
Browse files Browse the repository at this point in the history
Signed-off-by: Philipp <[email protected]>
  • Loading branch information
Philipp committed Jun 24, 2019
1 parent 476b8b2 commit 5ca6832
Show file tree
Hide file tree
Showing 3 changed files with 33 additions and 35 deletions.
4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -18,13 +18,13 @@
"concat": "^1.0.3",
"create-file": "^1.0.1",
"del": "^4.1.1",
"eslint": "^5.16.0",
"eslint": "^6.0.0",
"fs-extra": "^8.0.1",
"glob-concat": "^1.0.1",
"html-minifier": "^4.0.0",
"jsonminify": "^0.4.1",
"node-sass": "^4.12.0",
"npm-check-updates": "^3.1.10",
"npm-check-updates": "^3.1.11",
"read-file": "^0.2.0",
"request": "^2.88.0",
"terser": "^4.0.0",
Expand Down
2 changes: 1 addition & 1 deletion src/js/background/utility.js
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
* @returns {Promise}
*/
this.activatePremium = (opts) => {
return new Promise(async (resolve) => {
return new Promise((resolve) => {
b.helper.model.getLicenseKey().then((response) => {
if (response.licenseKey === opts.licenseKey) { // the given license key is already stored -> return true, but don't reinitialize
resolve({success: true, skip: true});
Expand Down
62 changes: 30 additions & 32 deletions src/js/helper/utility.js
Original file line number Diff line number Diff line change
Expand Up @@ -15,40 +15,38 @@
* @param {boolean} active
* @returns {Promise}
*/
this.openUrl = (infos, type = "default", active = true) => {
return new Promise((resolve) => {
if (infos.url === "about:blank") {
return;
} else if (infos.url.startsWith("javascript:")) {
location.href = infos.url;
}

ext.helper.model.setData({
"u/lastOpened": infos.id,
"u/performReopening": active ? (infos.reopenSidebar || false) : false
});
this.openUrl = async (infos, type = "default", active = true) => {
if (infos.url === "about:blank") {
return;
} else if (infos.url.startsWith("javascript:")) {
location.href = infos.url;
}

if (type === "incognito") {
ext.helper.model.call("openLink", {
href: infos.url,
incognito: true
}).then(resolve);
} else if (type === "newWindow") {
ext.helper.model.call("openLink", {
href: infos.url,
newWindow: true
}).then(resolve);
} else {
ext.helper.model.call("openLink", {
parentId: infos.parentId,
id: infos.id,
href: infos.url,
newTab: type === "newTab",
position: ext.helper.model.getData("b/newTabPosition"),
active: active
}).then(resolve);
}
ext.helper.model.setData({
"u/lastOpened": infos.id,
"u/performReopening": active ? (infos.reopenSidebar || false) : false
});

if (type === "incognito") {
await ext.helper.model.call("openLink", {
href: infos.url,
incognito: true
});
} else if (type === "newWindow") {
await ext.helper.model.call("openLink", {
href: infos.url,
newWindow: true
});
} else {
await ext.helper.model.call("openLink", {
parentId: infos.parentId,
id: infos.id,
href: infos.url,
newTab: type === "newTab",
position: ext.helper.model.getData("b/newTabPosition"),
active: active
});
}
};

/**
Expand Down

0 comments on commit 5ca6832

Please sign in to comment.