diff --git a/src/lib/inject-chart-profile-hover.js b/src/lib/inject-chart-profile-hover.js index 9cb4b01..ee51cef 100644 --- a/src/lib/inject-chart-profile-hover.js +++ b/src/lib/inject-chart-profile-hover.js @@ -10,7 +10,7 @@ const injectChartProfileHover = async () => { profileCard.dataset.coinflict = true; - const userId = profileHoverContainer.dataset.userId; + const {userId} = profileHoverContainer.dataset; const biases = await buildBiasElement(userId); const negativeMargin = 12; diff --git a/src/lib/inject-chart-profile-page.js b/src/lib/inject-chart-profile-page.js index f53dd23..8ddabc2 100644 --- a/src/lib/inject-chart-profile-page.js +++ b/src/lib/inject-chart-profile-page.js @@ -9,7 +9,7 @@ const injectChartProfilePage = async () => { profileHeaderCard.dataset.coinflict = true; - const userId = document.querySelector('.ProfileNav').dataset.userId; + const {userId} = document.querySelector('.ProfileNav').dataset; const biases = await buildBiasElement(userId); const bio = profileHeaderCard.querySelector('.ProfileHeaderCard-bio'); diff --git a/src/lib/preload-data.js b/src/lib/preload-data.js index 1eba4a9..de2515b 100644 --- a/src/lib/preload-data.js +++ b/src/lib/preload-data.js @@ -10,7 +10,7 @@ const scrapeDataAttribute = dataAttribute => { const preloadData = () => { new Set([ ...scrapeDataAttribute('user-id'), - ...scrapeDataAttribute('mention-user-id'), + ...scrapeDataAttribute('mention-user-id') ]).forEach(getData); }; diff --git a/src/lib/webextension-fetch.js b/src/lib/webextension-fetch.js index 97a49f9..fd278c6 100644 --- a/src/lib/webextension-fetch.js +++ b/src/lib/webextension-fetch.js @@ -7,7 +7,7 @@ const serializeResponse = async response => { for (const [header, value] of headers.entries()) { serializedResponse.headers[header] = value; - }; + } serializedResponse.body = [...new Uint8Array(await response.arrayBuffer())]; @@ -36,7 +36,7 @@ webextensionFetch.listen = () => { if (contentScriptQuery === 'webextension-fetch') { const response = await fetch(input, init); - return await serializeResponse(response); + return serializeResponse(response); } }); }; diff --git a/webpack.config.js b/webpack.config.js index 25c3384..0a52c1b 100644 --- a/webpack.config.js +++ b/webpack.config.js @@ -4,7 +4,7 @@ const CopyWebpackPlugin = require('copy-webpack-plugin'); module.exports = () => ({ entry: { content: './src/content', - background: './src/background', + background: './src/background' }, output: { path: path.join(__dirname, 'dist'),