diff --git a/package-lock.json b/package-lock.json index ff2f488e2..bcc47ecd9 100644 --- a/package-lock.json +++ b/package-lock.json @@ -20,6 +20,7 @@ "hybrids": "^9.1.15", "idb": "^8.0.2", "jwt-decode": "^4.0.0", + "plotly.js-basic-dist": "^3.0.1", "tldts-experimental": "^6.1.82" }, "devDependencies": { @@ -11588,6 +11589,12 @@ "dev": true, "license": "MIT" }, + "node_modules/plotly.js-basic-dist": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/plotly.js-basic-dist/-/plotly.js-basic-dist-3.0.1.tgz", + "integrity": "sha512-TFhJjbCdOSp8IhxThlcaE9doaiBQ8gdFkBoyJ1UrsnLjJzsSGkNfVd2jl51WtOMiAxMSW0F1dtELEju4/cicnQ==", + "license": "MIT" + }, "node_modules/postcss": { "version": "8.5.3", "resolved": "https://registry.npmjs.org/postcss/-/postcss-8.5.3.tgz", diff --git a/package.json b/package.json index df49246e6..d65d51e8a 100644 --- a/package.json +++ b/package.json @@ -53,6 +53,7 @@ "hybrids": "^9.1.15", "idb": "^8.0.2", "jwt-decode": "^4.0.0", + "plotly.js-basic-dist": "^3.0.1", "tldts-experimental": "^6.1.82" }, "engineStrict": true, diff --git a/scripts/build.js b/scripts/build.js index 83cf5fd8c..f4b2258af 100644 --- a/scripts/build.js +++ b/scripts/build.js @@ -32,6 +32,7 @@ const options = { srcDir: resolve(pwd, 'src'), outDir: resolve(pwd, 'dist'), assets: ['_locales', 'icons', 'static_pages'], + pages: ['logger', 'onboarding', 'whotracksme'], }; // Generate arguments from command line @@ -307,7 +308,7 @@ if (manifest.declarative_net_request?.rule_resources) { // --- Generate entry points --- -const source = ['pages/onboarding/index.html', 'pages/logger/index.html']; +const source = options.pages.map((page) => `pages/${page}/index.html`); const content_scripts = []; if (manifest.action?.default_popup) { diff --git a/src/background/external.js b/src/background/external.js index 360ab4677..468a80e16 100644 --- a/src/background/external.js +++ b/src/background/external.js @@ -12,7 +12,6 @@ import { store } from 'hybrids'; import Session from '/store/session.js'; -import { MergedStats } from '/store/daily-stats.js'; if (__PLATFORM__ === 'chromium' || __PLATFORM__ === 'firefox') { // Listen for messages from Ghostery Search extension @@ -23,8 +22,6 @@ if (__PLATFORM__ === 'chromium' || __PLATFORM__ === 'firefox') { 'search@ghostery.com', // Firefox ]; - const GHOSTERY_NEW_TAB_EXTENSION_IDS = ['newtab@ghostery.com']; - chrome.runtime.onMessageExternal.addListener( (message, sender, sendResponse) => { // Refresh session support for Ghostery Search extension @@ -43,37 +40,6 @@ if (__PLATFORM__ === 'chromium' || __PLATFORM__ === 'firefox') { } } - // Send historical stats to Ghostery New Tab extension - if (GHOSTERY_NEW_TAB_EXTENSION_IDS.includes(sender.id)) { - switch (message?.name) { - case 'getDashboardStats': { - (async () => { - const stats = await store.resolve(MergedStats); - - // Firefox does not serialize correctly objects with getters - sendResponse(JSON.parse(JSON.stringify(stats))); - })(); - - return true; - } - case 'getUser': { - (async () => { - const session = await store.resolve(Session); - - // Firefox does not serialize correctly objects with getters - sendResponse(session.user && JSON.parse(JSON.stringify(session))); - })(); - - return true; - } - default: - console.error( - `[external] Unknown message type from "${sender.id}"`, - message, - ); - } - } - return false; }, ); diff --git a/src/pages/panel/components/menu-item.js b/src/pages/panel/components/menu-item.js index 475cdc75a..c116d4a67 100644 --- a/src/pages/panel/components/menu-item.js +++ b/src/pages/panel/components/menu-item.js @@ -16,7 +16,7 @@ import { openTabWithUrl } from '/utils/tabs.js'; export default { href: '', icon: '', - suffixIcon: 'arrow-right', + suffixIcon: 'chevron-right', internal: false, render: ({ href, icon, suffixIcon, internal }) => html`