From 5eea7b9e8c2ed68ecfe0aa0e9206e50b2abc4018 Mon Sep 17 00:00:00 2001 From: JannisX11 Date: Tue, 11 Apr 2023 21:39:27 +0200 Subject: [PATCH] Count new installations --- js/boot_loader.js | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/js/boot_loader.js b/js/boot_loader.js index 7dbf7e21..f40bb9a5 100644 --- a/js/boot_loader.js +++ b/js/boot_loader.js @@ -87,6 +87,18 @@ if (!Blockbench.isWeb || !Blockbench.isPWA) { $.ajaxSetup({ cache: false }); } +if (Blockbench.startup_count == 1) { + try { + jQuery.ajax({ + url: 'https://blckbn.ch/api/event/new_installation', + type: 'POST', + data: {} + }) + } catch (err) { + console.error(err); + } +} + Blockbench.on('before_closing', (event) => { if (!Blockbench.hasFlag('no_localstorage_saving')) { Settings.saveLocalStorages()