summaryrefslogtreecommitdiffstats
path: root/assets/js/app.js.bvr
diff options
context:
space:
mode:
authorsijanec <sijanecantonluka@gmail.com>2020-05-20 19:21:31 +0200
committersijanec <sijanecantonluka@gmail.com>2020-05-20 19:21:31 +0200
commit448708182490d551721767bffc34ef35375f5082 (patch)
treef039502e4b2bb7aee1ad162aca38f89a2fb7cc5f /assets/js/app.js.bvr
parentMerge branch 'dev' of https://github.com/beziapp/beziapp.github.io into dev (diff)
downloadbeziapp-448708182490d551721767bffc34ef35375f5082.tar
beziapp-448708182490d551721767bffc34ef35375f5082.tar.gz
beziapp-448708182490d551721767bffc34ef35375f5082.tar.bz2
beziapp-448708182490d551721767bffc34ef35375f5082.tar.lz
beziapp-448708182490d551721767bffc34ef35375f5082.tar.xz
beziapp-448708182490d551721767bffc34ef35375f5082.tar.zst
beziapp-448708182490d551721767bffc34ef35375f5082.zip
Diffstat (limited to 'assets/js/app.js.bvr')
-rw-r--r--assets/js/app.js.bvr20
1 files changed, 15 insertions, 5 deletions
diff --git a/assets/js/app.js.bvr b/assets/js/app.js.bvr
index 413c4a6..a75505e 100644
--- a/assets/js/app.js.bvr
+++ b/assets/js/app.js.bvr
@@ -54,11 +54,21 @@ function gsecErrorHandlerUI(err) {
var error_report_function = async function (msg, url, lineNo, columnNo, error) {
- var data = {};
- data.error = {"msg": msg, "url": url, "line": lineNo, "column": columnNo, "obj": error};
- data.client = {"ua": navigator.userAgent, "app_version": app_version, "previous_commit": previous_commit};
- data.type = "error";
- $.post("https://beziapp-report.gimb.tk/", data);
+ localforage.getItem("errorReporting").then((value) => {
+ let selectedE = value;
+ if(value == null || value.length < 1) {
+ selectedE = "on";
+ }
+ if(selectedE == "on") {
+ var data = {};
+ data.error = {"msg": msg, "url": url, "line": lineNo, "column": columnNo, "obj": error};
+ data.client = {"ua": navigator.userAgent, "app_version": app_version, "previous_commit": previous_commit};
+ data.type = "error";
+ $.post("https://beziapp-report.gimb.tk/", data);
+ } else {
+ console.log("error not reported as reporting is disabled!");
+ }
+ }).catch(() => {});
return false;
}