From b25918022cc2dfc13ac7400d65a774d0450db334 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jind=C5=99ich=20B=C3=A4r?= Date: Fri, 26 May 2023 15:00:10 +0200 Subject: [PATCH] fix: download extension to correct folder --- scripts/download.js | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/scripts/download.js b/scripts/download.js index 4aed930..4cbd674 100644 --- a/scripts/download.js +++ b/scripts/download.js @@ -1,7 +1,5 @@ const axios = require('axios').default; const cheerio = require('cheerio'); -const fs = require('fs'); -const admZip = require('adm-zip'); const AdmZip = require('adm-zip'); const url = 'https://addons.mozilla.org/en-US/firefox/addon/i-dont-care-about-cookies/versions/'; @@ -12,9 +10,8 @@ axios(url).then(async (response) => { const x = await axios(url, { responseType: 'arraybuffer' - }).then(x => x.data); + }).then(x => x.data) const unzipper = new AdmZip(x); - - unzipper.extractAllTo('../extension', true); + unzipper.extractAllTo(__dirname + '/../extension', true); }).catch(console.error); \ No newline at end of file