aboutsummaryrefslogtreecommitdiff
path: root/ext/fg/js/content-script-main.js
diff options
context:
space:
mode:
authortoasted-nutbread <toasted-nutbread@users.noreply.github.com>2020-04-26 16:55:25 -0400
committerGitHub <noreply@github.com>2020-04-26 16:55:25 -0400
commit5b96559df819f496b39acb75c679f6b3d8c8e65d (patch)
tree95af8543c642f4ddc30982526e022967aac49742 /ext/fg/js/content-script-main.js
parentca033a87a0d302151b430acfdf9d480514c14aed (diff)
Error logging refactoring (#454)
* Create new logging methods on yomichan object * Use new yomichan.logError instead of global logError * Remove old logError * Handle unhandledrejection events * Add addEventListener stub * Update log function * Update error conversion to support more types * Add log event * Add API log function * Log errors to the backend * Make error/warning logs update the badge * Clear log error indicator on extension button click * Log correct URL on the background page * Fix incorrect error conversion * Remove unhandledrejection handling Firefox doesn't support it properly. * Remove unused argument type from log function * Improve function name * Change console.warn to yomichan.logWarning * Move log forwarding initialization into main scripts
Diffstat (limited to 'ext/fg/js/content-script-main.js')
-rw-r--r--ext/fg/js/content-script-main.js2
1 files changed, 2 insertions, 0 deletions
diff --git a/ext/fg/js/content-script-main.js b/ext/fg/js/content-script-main.js
index 0b852644..277e6567 100644
--- a/ext/fg/js/content-script-main.js
+++ b/ext/fg/js/content-script-main.js
@@ -22,6 +22,7 @@
* PopupProxy
* PopupProxyHost
* apiBroadcastTab
+ * apiForwardLogsToBackend
* apiOptionsGet
*/
@@ -62,6 +63,7 @@ async function createPopupProxy(depth, id, parentFrameId) {
}
(async () => {
+ apiForwardLogsToBackend();
await yomichan.prepare();
const data = window.frontendInitializationData || {};