From 821cec22add2c4908e1e04f2878e7234c7277d70 Mon Sep 17 00:00:00 2001 From: msramalho <19508417+msramalho@users.noreply.github.com> Date: Tue, 7 Mar 2023 22:35:19 +0000 Subject: [PATCH] improving console dumps --- README.md | 1 + source/js/background.js | 2 +- source/vue/Popup.vue | 1 - source/vue/TaskItem.vue | 2 +- 4 files changed, 3 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index 53ac8d4..aeceb49 100644 --- a/README.md +++ b/README.md @@ -22,6 +22,7 @@ Using [web-ext](https://extensionworkshop.com/documentation/develop/getting-star 1. Run `npm install --global web-ext` (only only for the first time) 1. In another terminal, run `web-ext run -t chromium` 1. Check that the extension is loaded by opening the extension options. +2. [chrome://identity-internals/](chrome://identity-internals/) can be useful to debug/revoke local access tokens diff --git a/source/js/background.js b/source/js/background.js index eac21a3..33f0a1e 100644 --- a/source/js/background.js +++ b/source/js/background.js @@ -11,7 +11,7 @@ const LOGIN_FAILED = `Please login before using this feature.`; chrome.runtime.onMessage.addListener(((r, s, sendResponse) => { processMessages(r, s) .then(response => { - console.log(`SUCCESS (${r.action}): ${JSON.stringify(response)}`) + console.log(`SUCCESS (${r.action}): ${JSON.stringify(response).slice(0,50)}`) sendResponse({ status: "success", result: response }) } ).catch(error => { diff --git a/source/vue/Popup.vue b/source/vue/Popup.vue index 9159673..2fbdcfc 100644 --- a/source/vue/Popup.vue +++ b/source/vue/Popup.vue @@ -95,7 +95,6 @@ export default { syncLocalTasks: function () { (async () => { const tasks = await this.callBackground({ action: "syncLocalTasks" }); - console.log(`TASKS: ${JSON.stringify(tasks)}`) if (!tasks) return; this.tasks = tasks; M.toast({ html: `sync complete: ${this.localTasksLength} task${this.localTasksLength != 1 ? 's' : ''} available`, classes: "green accent-4" }); diff --git a/source/vue/TaskItem.vue b/source/vue/TaskItem.vue index 7c71ad7..6c8a707 100644 --- a/source/vue/TaskItem.vue +++ b/source/vue/TaskItem.vue @@ -54,7 +54,7 @@ export default { }, methods: { checkStatus: function () { - console.log(`Checking status ${JSON.stringify(this.task)}`); + console.log(`Checking status task id=${JSON.stringify(this.task?.id)}`); if (this.taskFinished(this.task)) return this.intervalId = setInterval(function () { this.callBackground(