From 3cc2ed025a465853ec08bbc582c0b4413ccf12e7 Mon Sep 17 00:00:00 2001 From: Pavel Loginov Date: Wed, 9 Nov 2022 22:54:35 +0300 Subject: [PATCH] v6.2.3.0 Changelog: https://roxy-wi.org/changelog#6_2_3 --- inc/script.js | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/inc/script.js b/inc/script.js index 18e610b9..618ec8cc 100644 --- a/inc/script.js +++ b/inc/script.js @@ -1527,12 +1527,13 @@ function show_version() { NProgress.configure({showSpinner: true}); } function statAgriment() { - if (localStorage.getItem('statistic') == null) { + var cur_url = window.location.href.split('/').pop(); + if (localStorage.getItem('statistic') == null && cur_url.split('?')[0] != 'login.py') { var titles = new Map() var body = new Map() var yes_ans = new Map() var no_ans = new Map() - var ver_question = randomIntFromInterval(1, 3); + var ver_question = randomIntFromInterval(1, 2); titles.set(1, 'Help us improve Roxy-WI'); titles.set(2, 'Data collection agreement'); body.set(1, 'We want to improve the user experience by collecting anonymous statistics. No marketing.'); @@ -1580,14 +1581,13 @@ function statAgriment() { $("#statistic-body").html(body.get(ver_question)); } if (localStorage.getItem('statistic') == 1) { - var cur_url = btoa(window.location.href.split('/').pop()); + cur_url = btoa(cur_url); sendGet('/page/send/'+cur_url); } } window.onload = statAgriment; function sendGet(page) { var xmlHttp = new XMLHttpRequest(); - var cur_url = btoa(window.location.href.split('/').pop()); var theUrl = 'https://roxy-wi.org/' + page; xmlHttp.open("GET", theUrl, true); // true for asynchronous xmlHttp.send(null);