summaryrefslogtreecommitdiffstats
path: root/assets/js/app.js.bvr
diff options
context:
space:
mode:
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;
}