mirror of
https://github.com/bellingcat/auto-archiver-extension.git
synced 2026-06-07 19:18:33 +03:00
improving console dumps
This commit is contained in:
@@ -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
|
||||
|
||||
|
||||
<!-- > You need to connect to a backend of the [bellingcat/auto-archiver-api](https://github.com/bellingcat/auto-archiver-api) make sure to setup that too. -->
|
||||
|
||||
@@ -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 => {
|
||||
|
||||
@@ -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" });
|
||||
|
||||
@@ -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(
|
||||
|
||||
Reference in New Issue
Block a user