mirror of
https://github.com/an-anime-team/an-anime-game-launcher.git
synced 2025-01-06 08:57:20 +03:00
36d130ead6
- core class was renamed to the LauncherLib - added upper- and lowercased secret names variants
29 lines
933 B
TypeScript
29 lines
933 B
TypeScript
const { ipcRenderer } = require('electron');
|
|
|
|
import $ from 'cash-dom';
|
|
import { LauncherLib } from './lib/LauncherLib';
|
|
import { LauncherUI } from './lib/LauncherUI';
|
|
|
|
$(() => {
|
|
LauncherUI.updateLang(LauncherLib.getConfig('lang.launcher'));
|
|
|
|
$('#participate').on('click', async () => {
|
|
await fetch(`https://an-anime-game-launcher.000webhostapp.com${ !$('#share-country').hasClass('checkbox-active') ? '/?hide-geo' : '' }`);
|
|
|
|
LauncherLib.updateConfig('analytics', LauncherLib.version);
|
|
|
|
ipcRenderer.invoke('hide-analytics-participation');
|
|
});
|
|
|
|
$('#skip').on('click', () => {
|
|
LauncherLib.updateConfig('analytics', LauncherLib.version);
|
|
|
|
ipcRenderer.invoke('hide-analytics-participation');
|
|
});
|
|
|
|
$('#skip-and-ignore').on('click', () => {
|
|
LauncherLib.updateConfig('analytics', null);
|
|
|
|
ipcRenderer.invoke('hide-analytics-participation');
|
|
});
|
|
});
|