diff options
author | Wojtek Kosior <koszko@koszko.org> | 2022-03-04 16:57:07 +0100 |
---|---|---|
committer | Wojtek Kosior <koszko@koszko.org> | 2022-03-04 17:25:17 +0100 |
commit | 4970930c2f866133c38fa73800f1a963f0856692 (patch) | |
tree | 5cb1f7aaa317b02dbc266a62e07c21b05340b106 /html | |
parent | 7fdb3e8474488de2b18da7e9b63719bb05961819 (diff) | |
download | browser-extension-4970930c2f866133c38fa73800f1a963f0856692.tar.gz browser-extension-4970930c2f866133c38fa73800f1a963f0856692.zip |
prepend all generated console messages with 'Haketilo:'
Diffstat (limited to 'html')
-rw-r--r-- | html/DOM_helpers.js | 4 | ||||
-rw-r--r-- | html/install.js | 4 | ||||
-rw-r--r-- | html/item_list.js | 2 | ||||
-rw-r--r-- | html/payload_create.js | 2 | ||||
-rw-r--r-- | html/popup.js | 4 | ||||
-rw-r--r-- | html/repo_query.js | 2 | ||||
-rw-r--r-- | html/settings.js | 2 |
7 files changed, 10 insertions, 10 deletions
diff --git a/html/DOM_helpers.js b/html/DOM_helpers.js index 9e64956..9097af0 100644 --- a/html/DOM_helpers.js +++ b/html/DOM_helpers.js @@ -110,7 +110,7 @@ function Showable(on_show_cb, on_hide_cb) { try { on_show_cb(); } catch(e) { - console.error(e); + console.error("Haketilo:", e); } return true; @@ -125,7 +125,7 @@ function Showable(on_show_cb, on_hide_cb) { try { on_hide_cb(); } catch(e) { - console.error(e); + console.error("Haketilo:", e); } return true; diff --git a/html/install.js b/html/install.js index c502719..fddee5d 100644 --- a/html/install.js +++ b/html/install.js @@ -105,7 +105,7 @@ async function init_work() { work.err = function (error, user_message) { if (error) - console.error(error); + console.error("Haketilo:", error); work.is_ok = false; work.reject_cb(user_message); } @@ -392,7 +392,7 @@ function InstallView(tab_id, on_view_show, on_view_hide) { try { await haketilodb.save_items(data); } catch(e) { - console.error(e); + console.error("Haketilo:", e); const msg = "Error writing to Haketilo's internal database :("; var dialog_prom = dialog.error(this.dialog_ctx, msg); } diff --git a/html/item_list.js b/html/item_list.js index bc1acb9..ba6b352 100644 --- a/html/item_list.js +++ b/html/item_list.js @@ -145,7 +145,7 @@ async function remove_clicked(list_ctx) try { await list_ctx.remove_cb(identifier); } catch(e) { - console.error(e); + console.error("Haketilo:", e); dialog.error(list_ctx.dialog_ctx, `Couldn't remove '${identifier}' :(`) } } diff --git a/html/payload_create.js b/html/payload_create.js index ebd9236..28ddc6b 100644 --- a/html/payload_create.js +++ b/html/payload_create.js @@ -199,7 +199,7 @@ async function create_clicked(form_ctx) dialog.info(form_ctx.dialog_ctx, "Successfully saved payload!"); clear_form(form_ctx); } catch(e) { - console.error(e); + console.error("Haketilo:", e); dialog.error(form_ctx.dialog_ctx, "Failed to save payload :("); } diff --git a/html/popup.js b/html/popup.js index ddc0f51..5a5db6c 100644 --- a/html/popup.js +++ b/html/popup.js @@ -59,7 +59,7 @@ async function get_current_tab() { try { return (await promise)[0]; } catch(e) { - console.log(e); + console.log("Haketilo:", e); } } @@ -157,7 +157,7 @@ async function main() { else var page_info = await get_page_info(tab_id); } catch(e) { - console.error(e); + console.error("Haketilo:", e); } if (page_info) { diff --git a/html/repo_query.js b/html/repo_query.js index 61f4b10..7cfd6fe 100644 --- a/html/repo_query.js +++ b/html/repo_query.js @@ -96,7 +96,7 @@ function RepoEntry(query_view, repo_url) { const schema = haketilo_schemas[$id]; const result = haketilo_validator.validate(response.json, schema); if (result.errors.length > 0) { - console.error(result.errors); + console.error("Haketilo:", result.errors); const reg = new RegExp(schema.properties.$schema.pattern); if (response.json.$schema && !reg.test(response.json.$schema)) diff --git a/html/settings.js b/html/settings.js index 686cc11..e258fcb 100644 --- a/html/settings.js +++ b/html/settings.js @@ -150,7 +150,7 @@ async function init_settings_page() { try { await haketilodb.get(); } catch(e) { - console.error(e); + console.error("Haketilo:", e); show_indexeddb_error(); return; } |