From ad87dbdcb977eabedd812dde8fc7729bcb43c03d Mon Sep 17 00:00:00 2001 From: Tamius Han Date: Tue, 20 Sep 2022 01:38:08 +0200 Subject: [PATCH] remove unnecessary logging --- src/ext/lib/comms/CommsServer.ts | 6 ------ src/popup/App.vue | 11 +---------- 2 files changed, 1 insertion(+), 16 deletions(-) diff --git a/src/ext/lib/comms/CommsServer.ts b/src/ext/lib/comms/CommsServer.ts index e848ad4..7adaed4 100644 --- a/src/ext/lib/comms/CommsServer.ts +++ b/src/ext/lib/comms/CommsServer.ts @@ -81,15 +81,11 @@ class CommsServer { // cross-pollination between content scripts running in different // tabs. - console.log('sendmessage of comms server. Received message:', message, 'and context:', context); - if (context?.origin !== CommsOrigin.ContentScript) { - console.log('origin is NOT content script. This means forwarding to content scripts is okay!'); if (context?.comms.forwardTo === 'all') { return this.sendToAll(message); } if (context?.comms.forwardTo === 'active') { - console.log('forwarding message to active tab:', message); return this.sendToActive(message); } if (context?.comms.forwardTo === 'contentScript') { @@ -182,8 +178,6 @@ class CommsServer { } private async processReceivedMessage(message, port){ - console.log('processing received message!', {message, portName: port.name, port}) - // this triggers events this.eventBus.send( message.command, diff --git a/src/popup/App.vue b/src/popup/App.vue index d399d2f..fb86643 100644 --- a/src/popup/App.vue +++ b/src/popup/App.vue @@ -111,12 +111,7 @@ export default { // get info about current site from background script while (true) { - try { - console.log('trying to get site ...'); - this.requestSite(); - } catch (e) { - console.warn('failed to load site:', e); - } + this.requestSite(); await this.sleep(5000); } }, @@ -150,7 +145,6 @@ export default { requestSite() { try { this.logger.log('info','popup', '[popup::getSite] Requesting current site ...') - console.info('requesting current site') // CSM.port.postMessage({command: 'get-current-site'}); this.eventBus.send( 'get-current-site', @@ -162,9 +156,6 @@ export default { } catch (e) { this.logger.log('error','popup','[popup::getSite] sending get-current-site failed for some reason. Reason:', e); } - }, - setSite(data) { - }, getRandomColor() { return `rgb(${Math.floor(Math.random() * 128)}, ${Math.floor(Math.random() * 128)}, ${Math.floor(Math.random() * 128)})`;