diff --git a/manifest/chrome.json b/manifest/chrome.json index d1f9f1fe..0e67a010 100644 --- a/manifest/chrome.json +++ b/manifest/chrome.json @@ -4,7 +4,7 @@ "default_locale": "en", "name": "__MSG_name__", "description": "__MSG_description__", - "version": "5.3.1", + "version": "5.3.2", "homepage_url": "https://muetab.com", "browser_action": { "default_icon": "icons/128x128.png" diff --git a/manifest/firefox.json b/manifest/firefox.json index 60e59801..88066c1b 100644 --- a/manifest/firefox.json +++ b/manifest/firefox.json @@ -2,7 +2,7 @@ "manifest_version": 2, "name": "Mue", "description": "Fast, open and free-to-use new tab page for modern browsers.", - "version": "5.3.1", + "version": "5.3.2", "homepage_url": "https://muetab.com", "browser_action": { "default_icon": "icons/128x128.png" diff --git a/package.json b/package.json index 3c597be1..85986dfb 100644 --- a/package.json +++ b/package.json @@ -9,7 +9,7 @@ "homepage": "https://muetab.com", "bugs": "https://github.com/mue/mue/issues/new?assignees=&labels=bug&template=bug-report.md&title=%5BBUG%5D", "license": "BSD-3-Clause", - "version": "5.3.1", + "version": "5.3.2", "dependencies": { "@emotion/react": "^11.4.1", "@emotion/styled": "^11.3.0", diff --git a/src/components/modals/main/settings/sections/Stats.jsx b/src/components/modals/main/settings/sections/Stats.jsx index 7dff41ed..da5e15a1 100644 --- a/src/components/modals/main/settings/sections/Stats.jsx +++ b/src/components/modals/main/settings/sections/Stats.jsx @@ -53,7 +53,6 @@ export default class Stats extends PureComponent {
{this.language.sections.settings_changed}: {this.state.stats.setting ? Object.keys(this.state.stats.setting).length : 0}
{this.language.sections.addons_installed}: {this.state.stats.marketplace ? this.state.stats.marketplace['install'] : 0}
{this.language.disable}
> ); } diff --git a/src/index.js b/src/index.js index 9cfd4667..7004542a 100644 --- a/src/index.js +++ b/src/index.js @@ -7,7 +7,7 @@ import './scss/index.scss'; // the toast css is based on default so we need to import it import 'react-toastify/dist/ReactToastify.min.css'; -// this is opt-in btw, allows you to see your stats etc +// local stats import Stats from './modules/helpers/stats'; // language @@ -28,9 +28,8 @@ if (window.languagecode !== 'en_GB' || window.languagecode !== 'en_US') { } window.constants = Constants; -// doesn't send to umami when offline mode is on if (localStorage.getItem('stats') === 'true') { - window.stats = new Stats(window.constants.UMAMI_ID); + window.stats = Stats; } else { window.stats = { tabLoad: () => '', diff --git a/src/modules/constants.js b/src/modules/constants.js index 936d0898..f995cf3d 100644 --- a/src/modules/constants.js +++ b/src/modules/constants.js @@ -26,13 +26,9 @@ export const COPYRIGHT_YEAR = '2018'; export const COPYRIGHT_LICENSE = 'BSD-3 License'; export const DONATE_USERNAME = 'davidjcralph'; // this only works if you use the same username for Patreon, GitHub and Ko-Fi -// umami -export const UMAMI_DOMAIN = 'https://umami.muetab.com'; -export const UMAMI_ID = '1b97e723-199c-48d8-8992-17c4e22d4f3c'; - // Offline images export const OFFLINE_IMAGES = 20; // Version export const BETA_VERSION = false; -export const VERSION = '5.3.1'; +export const VERSION = '5.3.2'; diff --git a/src/modules/helpers/stats.js b/src/modules/helpers/stats.js index 70a85125..f402de4a 100644 --- a/src/modules/helpers/stats.js +++ b/src/modules/helpers/stats.js @@ -1,33 +1,7 @@ export default class Stats { - constructor(id) { - this.id = id; - this.url = window.constants.UMAMI_DOMAIN + '/api/collect'; - this.online = (localStorage.getItem('offlineMode') === 'false'); - } - - async postEvent(type, name) { + static async postEvent(type, name) { const value = name.toLowerCase().replaceAll(' ', '-'); - if (this.online) { - // umami - await fetch(this.url, { - method: 'POST', - headers: { - 'Content-Type': 'application/json' - }, - body: JSON.stringify({ - type: 'event', - payload: { - website: this.id, - url: '/', - event_type: type, - event_value: value - } - }) - }); - } - - // local const data = JSON.parse(localStorage.getItem('statsData')); // tl;dr this creates the objects if they don't exist // this really needs a cleanup at some point @@ -45,29 +19,9 @@ export default class Stats { localStorage.setItem('statsData', JSON.stringify(data)); } - async tabLoad() { - if (this.online) { - // umami - await fetch(this.url, { - method: 'POST', - headers: { - 'Content-Type': 'application/json' - }, - body: JSON.stringify({ - type: 'pageview', - payload: { - website: this.id, - url: '/', - language: window.languagecode.replace('_', '-'), - screen: `${window.screen.width}x${window.screen.height}` - } - }) - }); - } - - // local + static async tabLoad() { const data = JSON.parse(localStorage.getItem('statsData')); data['tabs-opened'] = data['tabs-opened'] + 1 || 1; localStorage.setItem('statsData', JSON.stringify(data)); } -} \ No newline at end of file +} diff --git a/src/translations/de_DE.json b/src/translations/de_DE.json index c109bdba..906a475c 100644 --- a/src/translations/de_DE.json +++ b/src/translations/de_DE.json @@ -292,7 +292,7 @@ }, "stats": { "title": "Stats", - "warning": "You need to enable usage data in order to use this feature. This will post anonymous statistics to our umami instance.", + "warning": "You need to enable usage data in order to use this feature. This data is only stored locally.", "sections": { "tabs_opened": "Tabs opened", "backgrounds_favourited": "Backgrounds favourited", @@ -302,8 +302,7 @@ "settings_changed": "Settings changed", "addons_installed": "Add-ons installed" }, - "usage": "Usage Stats", - "disable": "Turning this off will clear your statistics locally, but will not delete the anonymous data posted to umami." + "usage": "Usage Stats" }, "experimental": { "title": "Experimentell", @@ -452,7 +451,6 @@ "description": "Enable settings to further protect your privacy with Mue.", "offline_mode_description": "Enabling offline mode will disable all requests to any service. This will result in online backgrounds, online quotes, marketplace, weather, quick links, change log and some about tab information to be disabled.", "ddg_proxy_description": "You can make image requests go through DuckDuckGo if you wish. By default, API requests go through our open source servers and image requests go through the original server. Turning this off for quick links will get the icons from Google instead of DuckDuckGo. DuckDuckGo proxy is always enabled for the Marketplace.", - "stats_description": "Enabling this will allow you to see the stats tab in settings which shows interesting things like how many tabs you have opened, backgrounds favourited/downloaded and more. This will also post anonymous statistics to our umami instance. You can find the source code to this instance on our GitHub page.", "links": { "title": "Links", "privacy_policy": "Privacy Policy", diff --git a/src/translations/en_GB.json b/src/translations/en_GB.json index e939c17f..5e74d781 100644 --- a/src/translations/en_GB.json +++ b/src/translations/en_GB.json @@ -292,7 +292,7 @@ }, "stats": { "title": "Stats", - "warning": "You need to enable usage data in order to use this feature. This will post anonymous statistics to our umami instance.", + "warning": "You need to enable usage data in order to use this feature. This data is only stored locally.", "sections": { "tabs_opened": "Tabs opened", "backgrounds_favourited": "Backgrounds favourited", @@ -302,8 +302,7 @@ "settings_changed": "Settings changed", "addons_installed": "Add-ons installed" }, - "usage": "Usage Stats", - "disable": "Turning this off will clear your statistics locally, but will not delete the anonymous data posted to umami." + "usage": "Usage Stats" }, "experimental": { "title": "Experimental", @@ -452,7 +451,6 @@ "description": "Enable settings to further protect your privacy with Mue.", "offline_mode_description": "Enabling offline mode will disable all requests to any service. This will result in online backgrounds, online quotes, marketplace, weather, quick links, change log and some about tab information to be disabled.", "ddg_proxy_description": "You can make image requests go through DuckDuckGo if you wish. By default, API requests go through our open source servers and image requests go through the original server. Turning this off for quick links will get the icons from Google instead of DuckDuckGo. DuckDuckGo proxy is always enabled for the Marketplace.", - "stats_description": "Enabling this will allow you to see the stats tab in settings which shows interesting things like how many tabs you have opened, backgrounds favourited/downloaded and more. This will also post anonymous statistics to our umami instance. You can find the source code to this instance on our GitHub page.", "links": { "title": "Links", "privacy_policy": "Privacy Policy", diff --git a/src/translations/en_US.json b/src/translations/en_US.json index 7c4eb09a..7a70ffd1 100644 --- a/src/translations/en_US.json +++ b/src/translations/en_US.json @@ -292,7 +292,7 @@ }, "stats": { "title": "Stats", - "warning": "You need to enable usage data in order to use this feature. This will post anonymous statistics to our umami instance.", + "warning": "You need to enable usage data in order to use this feature. This data is only stored locally.", "sections": { "tabs_opened": "Tabs opened", "backgrounds_favourited": "Backgrounds favourited", @@ -302,8 +302,7 @@ "settings_changed": "Settings changed", "addons_installed": "Add-ons installed" }, - "usage": "Usage Stats", - "disable": "Turning this off will clear your statistics locally, but will not delete the anonymous data posted to umami." + "usage": "Usage Stats" }, "experimental": { "title": "Experimental", @@ -452,7 +451,6 @@ "description": "Enable settings to further protect your privacy with Mue.", "offline_mode_description": "Enabling offline mode will disable all requests to any service. This will result in online backgrounds, online quotes, marketplace, weather, quick links, change log and some about tab information to be disabled.", "ddg_proxy_description": "You can make image requests go through DuckDuckGo if you wish. By default, API requests go through our open source servers and image requests go through the original server. Turning this off for quick links will get the icons from Google instead of DuckDuckGo. DuckDuckGo proxy is always enabled for the Marketplace.", - "stats_description": "Enabling this will allow you to see the stats tab in settings which shows interesting things like how many tabs you have opened, backgrounds favourited/downloaded and more. This will also post anonymous statistics to our umami instance. You can find the source code to this instance on our GitHub page.", "links": { "title": "Links", "privacy_policy": "Privacy Policy", diff --git a/src/translations/es.json b/src/translations/es.json index 9dcfb988..9da666d1 100644 --- a/src/translations/es.json +++ b/src/translations/es.json @@ -292,7 +292,7 @@ }, "stats": { "title": "Estadísticas", - "warning": "Tienes que activar las estadísticas de uso para poder utilizar esta función. Esto enviará estadísticas anónimas a nuestra instancia de umami.", + "warning": "Tienes que activar las estadísticas de uso para poder utilizar esta función. This data is only stored locally.", "sections": { "tabs_opened": "Pestañas abiertas", "backgrounds_favourited": "Fondos favoritos", @@ -302,8 +302,7 @@ "settings_changed": "Ajustes cambiados", "addons_installed": "Complementos instalados" }, - "usage": "Estadísticas de uso", - "disable": "Si se desactiva, se borrarán las estadísticas localmente, pero no se eliminarán los datos anónimos publicados en umami." + "usage": "Estadísticas de uso" }, "experimental": { "title": "Experimental", @@ -452,7 +451,6 @@ "description": "Activa estos ajustes para proteger aún más tu privacidad con Mue.", "offline_mode_description": "Al activar el modo offline se deshabilitarán todas las peticiones a cualquier servicio. Esto hará que se desactiven los fondos en línea, las citas en línea, la tienda, el tiempo, los enlaces rápidos, el registro de cambios y alguna información de la pestaña Acerca de.", "ddg_proxy_description": "Puedes hacer que las solicitudes de imágenes pasen por DuckDuckGo si lo deseas. Por defecto, las solicitudes a la API van a tráves de nuestros servidores de código abierto y las solicitudes de imágenes van a través del servidor original. Si desactivas esta opción para los enlaces rápidos y los iconos de obtendrán de Google en lugar de DuckDuckGo. El proxy de DuckDuckGo está siempre activado para la tienda.", - "stats_description": "Al activar esto, podrás ver la pestaña de estadísticas en los ajustes, que muestra cosas interesantes como el número de pestañas que has abierto, los fondos favoritos/descargados y más. Esto también enviará estadísticas anónimas a nuestra instancia de umami. Puedes encontrar el código fuente de esta instancia en nuestra página de GitHub.", "links": { "title": "Enlaces", "privacy_policy": "Política de privacidad", diff --git a/src/translations/fr.json b/src/translations/fr.json index 705cd380..d5a6c3e7 100644 --- a/src/translations/fr.json +++ b/src/translations/fr.json @@ -292,7 +292,7 @@ }, "stats": { "title": "Stats", - "warning": "You need to enable usage data in order to use this feature. This will post anonymous statistics to our umami instance.", + "warning": "You need to enable usage data in order to use this feature. This data is only stored locally.", "sections": { "tabs_opened": "Tabs opened", "backgrounds_favourited": "Backgrounds favourited", @@ -302,8 +302,7 @@ "settings_changed": "Settings changed", "addons_installed": "Add-ons installed" }, - "usage": "Usage Stats", - "disable": "Turning this off will clear your statistics locally, but will not delete the anonymous data posted to umami." + "usage": "Usage Stats" }, "experimental": { "title": "Expérimental", @@ -452,7 +451,6 @@ "description": "Enable settings to further protect your privacy with Mue.", "offline_mode_description": "Enabling offline mode will disable all requests to any service. This will result in online backgrounds, online quotes, marketplace, weather, quick links, change log and some about tab information to be disabled.", "ddg_proxy_description": "You can make image requests go through DuckDuckGo if you wish. By default, API requests go through our open source servers and image requests go through the original server. Turning this off for quick links will get the icons from Google instead of DuckDuckGo. DuckDuckGo proxy is always enabled for the Marketplace.", - "stats_description": "Enabling this will allow you to see the stats tab in settings which shows interesting things like how many tabs you have opened, backgrounds favourited/downloaded and more. This will also post anonymous statistics to our umami instance. You can find the source code to this instance on our GitHub page.", "links": { "title": "Links", "privacy_policy": "Privacy Policy", diff --git a/src/translations/nl.json b/src/translations/nl.json index a17fcbea..56c772ff 100644 --- a/src/translations/nl.json +++ b/src/translations/nl.json @@ -292,7 +292,7 @@ }, "stats": { "title": "Stats", - "warning": "You need to enable usage data in order to use this feature. This will post anonymous statistics to our umami instance.", + "warning": "You need to enable usage data in order to use this feature. This data is only stored locally.", "sections": { "tabs_opened": "Tabs opened", "backgrounds_favourited": "Backgrounds favourited", @@ -302,8 +302,7 @@ "settings_changed": "Settings changed", "addons_installed": "Add-ons installed" }, - "usage": "Usage Stats", - "disable": "Turning this off will clear your statistics locally, but will not delete the anonymous data posted to umami." + "usage": "Usage Stats" }, "experimental": { "title": "Experimenteel", @@ -452,7 +451,6 @@ "description": "Enable settings to further protect your privacy with Mue.", "offline_mode_description": "Enabling offline mode will disable all requests to any service. This will result in online backgrounds, online quotes, marketplace, weather, quick links, change log and some about tab information to be disabled.", "ddg_proxy_description": "You can make image requests go through DuckDuckGo if you wish. By default, API requests go through our open source servers and image requests go through the original server. Turning this off for quick links will get the icons from Google instead of DuckDuckGo. DuckDuckGo proxy is always enabled for the Marketplace.", - "stats_description": "Enabling this will allow you to see the stats tab in settings which shows interesting things like how many tabs you have opened, backgrounds favourited/downloaded and more. This will also post anonymous statistics to our umami instance. You can find the source code to this instance on our GitHub page.", "links": { "title": "Links", "privacy_policy": "Privacy Policy", diff --git a/src/translations/no.json b/src/translations/no.json index 1eb58deb..e7e266bd 100644 --- a/src/translations/no.json +++ b/src/translations/no.json @@ -292,7 +292,7 @@ }, "stats": { "title": "Stats", - "warning": "You need to enable usage data in order to use this feature. This will post anonymous statistics to our umami instance.", + "warning": "You need to enable usage data in order to use this feature. This data is only stored locally.", "sections": { "tabs_opened": "Tabs opened", "backgrounds_favourited": "Backgrounds favourited", @@ -302,8 +302,7 @@ "settings_changed": "Settings changed", "addons_installed": "Add-ons installed" }, - "usage": "Usage Stats", - "disable": "Turning this off will clear your statistics locally, but will not delete the anonymous data posted to umami." + "usage": "Usage Stats" }, "experimental": { "title": "Eksperimental", @@ -452,7 +451,6 @@ "description": "Enable settings to further protect your privacy with Mue.", "offline_mode_description": "Enabling offline mode will disable all requests to any service. This will result in online backgrounds, online quotes, marketplace, weather, quick links, change log and some about tab information to be disabled.", "ddg_proxy_description": "You can make image requests go through DuckDuckGo if you wish. By default, API requests go through our open source servers and image requests go through the original server. Turning this off for quick links will get the icons from Google instead of DuckDuckGo. DuckDuckGo proxy is always enabled for the Marketplace.", - "stats_description": "Enabling this will allow you to see the stats tab in settings which shows interesting things like how many tabs you have opened, backgrounds favourited/downloaded and more. This will also post anonymous statistics to our umami instance. You can find the source code to this instance on our GitHub page.", "links": { "title": "Links", "privacy_policy": "Privacy Policy", diff --git a/src/translations/ru.json b/src/translations/ru.json index c53e55c5..9c60ba0e 100644 --- a/src/translations/ru.json +++ b/src/translations/ru.json @@ -292,7 +292,7 @@ }, "stats": { "title": "Stats", - "warning": "You need to enable usage data in order to use this feature. This will post anonymous statistics to our umami instance.", + "warning": "You need to enable usage data in order to use this feature. This data is only stored locally.", "sections": { "tabs_opened": "Tabs opened", "backgrounds_favourited": "Backgrounds favourited", @@ -302,8 +302,7 @@ "settings_changed": "Settings changed", "addons_installed": "Add-ons installed" }, - "usage": "Usage Stats", - "disable": "Turning this off will clear your statistics locally, but will not delete the anonymous data posted to umami." + "usage": "Usage Stats" }, "experimental": { "title": "Экспериментальные настройки", @@ -453,7 +452,6 @@ "description": "Enable settings to further protect your privacy with Mue.", "offline_mode_description": "Enabling offline mode will disable all requests to any service. This will result in online backgrounds, online quotes, marketplace, weather, quick links, change log and some about tab information to be disabled.", "ddg_proxy_description": "You can make image requests go through DuckDuckGo if you wish. By default, API requests go through our open source servers and image requests go through the original server. Turning this off for quick links will get the icons from Google instead of DuckDuckGo. DuckDuckGo proxy is always enabled for the Marketplace.", - "stats_description": "Enabling this will allow you to see the stats tab in settings which shows interesting things like how many tabs you have opened, backgrounds favourited/downloaded and more. This will also post anonymous statistics to our umami instance. You can find the source code to this instance on our GitHub page.", "links": { "title": "Links", "privacy_policy": "Privacy Policy", diff --git a/src/translations/zh_CN.json b/src/translations/zh_CN.json index 25354b43..a3a942d9 100644 --- a/src/translations/zh_CN.json +++ b/src/translations/zh_CN.json @@ -292,7 +292,7 @@ }, "stats": { "title": "Stats", - "warning": "You need to enable usage data in order to use this feature. This will post anonymous statistics to our umami instance.", + "warning": "You need to enable usage data in order to use this feature. This data is only stored locally.", "sections": { "tabs_opened": "Tabs opened", "backgrounds_favourited": "Backgrounds favourited", @@ -302,8 +302,7 @@ "settings_changed": "Settings changed", "addons_installed": "Add-ons installed" }, - "usage": "Usage Stats", - "disable": "Turning this off will clear your statistics locally, but will not delete the anonymous data posted to umami." + "usage": "Usage Stats" }, "experimental": { "title": "实验性功能", @@ -452,7 +451,6 @@ "description": "Enable settings to further protect your privacy with Mue.", "offline_mode_description": "Enabling offline mode will disable all requests to any service. This will result in online backgrounds, online quotes, marketplace, weather, quick links, change log and some about tab information to be disabled.", "ddg_proxy_description": "You can make image requests go through DuckDuckGo if you wish. By default, API requests go through our open source servers and image requests go through the original server. Turning this off for quick links will get the icons from Google instead of DuckDuckGo. DuckDuckGo proxy is always enabled for the Marketplace.", - "stats_description": "Enabling this will allow you to see the stats tab in settings which shows interesting things like how many tabs you have opened, backgrounds favourited/downloaded and more. This will also post anonymous statistics to our umami instance. You can find the source code to this instance on our GitHub page.", "links": { "title": "Links", "privacy_policy": "Privacy Policy",