Skip to content

Commit

Permalink
fix: download extension to correct folder
Browse files Browse the repository at this point in the history
  • Loading branch information
barjin committed May 26, 2023
1 parent a5d2e29 commit b259180
Showing 1 changed file with 2 additions and 5 deletions.
7 changes: 2 additions & 5 deletions scripts/download.js
Original file line number Diff line number Diff line change
@@ -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/';
Expand All @@ -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);

0 comments on commit b259180

Please sign in to comment.