From 06c2e048c7c40f4610d14a477a79f66becddf200 Mon Sep 17 00:00:00 2001 From: "deepsource-autofix[bot]" <62050782+deepsource-autofix[bot]@users.noreply.github.com> Date: Sat, 10 Oct 2020 14:40:23 +0000 Subject: [PATCH] Format code with prettier This commit fixes the style issues introduced in 1969cc1 according to the output from prettier. Details: https://deepsource.io/gh/MillenniumEarl/F95API/transform/04519dc7-2abc-472f-a3eb-289dd9070dc5/ --- app/scripts/classes/game-download.js | 16 +++++++++------- 1 file changed, 9 insertions(+), 7 deletions(-) diff --git a/app/scripts/classes/game-download.js b/app/scripts/classes/game-download.js index d8323a9..2145830 100644 --- a/app/scripts/classes/game-download.js +++ b/app/scripts/classes/game-download.js @@ -41,8 +41,10 @@ class GameDownload { * @return {Promise} Result of the operation */ async download(path) { - if (this.link.includes("mega.nz")) return await downloadMEGA(this.link, path); - else if (this.link.includes("nopy.to")) return await downloadNOPY(this.link, path); + if (this.link.includes("mega.nz")) + return await downloadMEGA(this.link, path); + else if (this.link.includes("nopy.to")) + return await downloadNOPY(this.link, path); } } module.exports = GameDownload; @@ -83,9 +85,9 @@ async function downloadNOPY(url, savepath) { await page.waitForSelector("#download"); // Set the save path - await page._client.send('Page.setDownloadBehavior', { - behavior: 'allow', - downloadPath: path.basename(path.dirname(savepath)) // Is a directory + await page._client.send("Page.setDownloadBehavior", { + behavior: "allow", + downloadPath: path.basename(path.dirname(savepath)), // Is a directory }); // Obtain the download button and click it @@ -94,8 +96,8 @@ async function downloadNOPY(url, savepath) { // Await for all the connections to close await page.waitForNavigation({ - waitUntil: 'networkidle0', - timeout: 0 // Disable timeout + waitUntil: "networkidle0", + timeout: 0, // Disable timeout }); // Close browser and page