aboutsummaryrefslogtreecommitdiff
path: root/ext/fg
diff options
context:
space:
mode:
Diffstat (limited to 'ext/fg')
-rw-r--r--ext/fg/js/content-script-main.js2
-rw-r--r--ext/fg/js/float-main.js2
-rw-r--r--ext/fg/js/float.js2
-rw-r--r--ext/fg/js/frontend-api-sender.js8
-rw-r--r--ext/fg/js/popup-proxy.js2
5 files changed, 10 insertions, 6 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 || {};
diff --git a/ext/fg/js/float-main.js b/ext/fg/js/float-main.js
index f056f707..5ef4b07c 100644
--- a/ext/fg/js/float-main.js
+++ b/ext/fg/js/float-main.js
@@ -17,6 +17,7 @@
/* global
* DisplayFloat
+ * apiForwardLogsToBackend
* apiOptionsGet
*/
@@ -68,5 +69,6 @@ async function popupNestedInitialize(id, depth, parentFrameId, url) {
}
(async () => {
+ apiForwardLogsToBackend();
new DisplayFloat();
})();
diff --git a/ext/fg/js/float.js b/ext/fg/js/float.js
index 2a5eba83..fd3b92cc 100644
--- a/ext/fg/js/float.js
+++ b/ext/fg/js/float.js
@@ -84,7 +84,7 @@ class DisplayFloat extends Display {
if (this._orphaned) {
this.setContent('orphaned');
} else {
- logError(error, true);
+ yomichan.logError(error);
}
}
diff --git a/ext/fg/js/frontend-api-sender.js b/ext/fg/js/frontend-api-sender.js
index 1d539cab..0ad3f085 100644
--- a/ext/fg/js/frontend-api-sender.js
+++ b/ext/fg/js/frontend-api-sender.js
@@ -81,12 +81,12 @@ class FrontendApiSender {
onAck(id) {
const info = this.callbacks.get(id);
if (typeof info === 'undefined') {
- console.warn(`ID ${id} not found for ack`);
+ yomichan.logWarning(new Error(`ID ${id} not found for ack`));
return;
}
if (info.ack) {
- console.warn(`Request ${id} already ack'd`);
+ yomichan.logWarning(new Error(`Request ${id} already ack'd`));
return;
}
@@ -98,12 +98,12 @@ class FrontendApiSender {
onResult(id, data) {
const info = this.callbacks.get(id);
if (typeof info === 'undefined') {
- console.warn(`ID ${id} not found`);
+ yomichan.logWarning(new Error(`ID ${id} not found`));
return;
}
if (!info.ack) {
- console.warn(`Request ${id} not ack'd`);
+ yomichan.logWarning(new Error(`Request ${id} not ack'd`));
return;
}
diff --git a/ext/fg/js/popup-proxy.js b/ext/fg/js/popup-proxy.js
index cd3c1bc9..93418202 100644
--- a/ext/fg/js/popup-proxy.js
+++ b/ext/fg/js/popup-proxy.js
@@ -148,7 +148,7 @@ class PopupProxy {
}
this._frameOffsetUpdatedAt = now;
} catch (e) {
- logError(e);
+ yomichan.logError(e);
} finally {
this._frameOffsetPromise = null;
}