Analytics has been done, it is possible to turn it off

This commit is contained in:
Данил 2022-11-22 21:38:57 +03:00
parent d8bc09074c
commit 3b23eedc21
2 changed files with 3 additions and 0 deletions

View file

@ -87,5 +87,6 @@
<script src="https://cdn.jsdelivr.net/npm/bootstrap@5.2.1/dist/js/bootstrap.min.js" integrity="sha384-7VPbUDkoPSGFnVtYi0QogXtr74QeVeeIs99Qfg5YCF+TidwNdjvaKZX19NZ/e6oz" crossorigin="anonymous"></script> <script src="https://cdn.jsdelivr.net/npm/bootstrap@5.2.1/dist/js/bootstrap.min.js" integrity="sha384-7VPbUDkoPSGFnVtYi0QogXtr74QeVeeIs99Qfg5YCF+TidwNdjvaKZX19NZ/e6oz" crossorigin="anonymous"></script>
<script src="/static/scripts/switch.js" type="application/javascript"></script> <script src="/static/scripts/switch.js" type="application/javascript"></script>
<script src="/static/scripts/createLabel.js" type="application/javascript"></script> <script src="/static/scripts/createLabel.js" type="application/javascript"></script>
<script src="/static/scripts/analytics.js" type="module" id="analytics"></script>
</body> </body>
</html> </html>

View file

@ -188,6 +188,8 @@ $(document).ready(async function() {
$analyticsSwitchTogglerName.text("Off"); $analyticsSwitchTogglerName.text("Off");
$analyticsSwitch.removeAttr("checked"); $analyticsSwitch.removeAttr("checked");
$("#analytics").remove();
toast(data.message); toast(data.message);
} else { } else {
toast("Failed to apply settings."); toast("Failed to apply settings.");