chore: remove umami, release 5.3.2

This commit is contained in:
David Ralph 2021-08-23 15:33:09 +01:00
parent 1d99622123
commit 30768053eb
16 changed files with 27 additions and 97 deletions

View File

@ -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"

View File

@ -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"

View File

@ -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",

View File

@ -53,7 +53,6 @@ export default class Stats extends PureComponent {
<p>{this.language.sections.settings_changed}: {this.state.stats.setting ? Object.keys(this.state.stats.setting).length : 0}</p>
<p>{this.language.sections.addons_installed}: {this.state.stats.marketplace ? this.state.stats.marketplace['install'] : 0}</p>
<Switch name='stats' text={this.language.usage} category='stats'/>
<p>{this.language.disable}</p>
</>
);
}

View File

@ -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: () => '',

View File

@ -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';

View File

@ -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));
}
}
}

View File

@ -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",

View File

@ -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",

View File

@ -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",

View File

@ -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",

View File

@ -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",

View File

@ -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",

View File

@ -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",

View File

@ -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",

View File

@ -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",