diff options
author | sijanec <sijanecantonluka@gmail.com> | 2020-05-20 19:21:31 +0200 |
---|---|---|
committer | sijanec <sijanecantonluka@gmail.com> | 2020-05-20 19:21:31 +0200 |
commit | 448708182490d551721767bffc34ef35375f5082 (patch) | |
tree | f039502e4b2bb7aee1ad162aca38f89a2fb7cc5f /assets/js/app.js.bvr | |
parent | Merge branch 'dev' of https://github.com/beziapp/beziapp.github.io into dev (diff) | |
download | beziapp-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.bvr | 20 |
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; } |