Skip to content

Commit 458c703

Browse files
committed
debugging
1 parent c8ff338 commit 458c703

File tree

2 files changed

+5
-1
lines changed

2 files changed

+5
-1
lines changed

src/extension/background.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -181,6 +181,7 @@ chrome.runtime.onConnect.addListener(port => {
181181

182182
// background.js recieves message from contentScript.js
183183
chrome.runtime.onMessage.addListener((request, sender) => {
184+
console.log('this is request from background', request)
184185
// IGNORE THE AUTOMATIC MESSAGE SENT BY CHROME WHEN CONTENT SCRIPT IS FIRST LOADED
185186
if (request.type === 'SIGN_CONNECT') {
186187
return true;

src/extension/contentScript.js

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,10 @@ window.addEventListener('message', msg => { // runs automatically every second
99
// messages sent by contentscrip
1010
if (firstMessage) {
1111
// tell the background script that the tab has reloaded
12-
chrome.runtime.sendMessage({ action: 'tabReload' });
12+
chrome.runtime.sendMessage({
13+
action: 'tabReload',
14+
payload: msg
15+
});
1316
firstMessage = false;
1417
}
1518

0 commit comments

Comments
 (0)