Skip to content

Commit 631ae4b

Browse files
(added) from laptop to desktop
1 parent 2f9460f commit 631ae4b

File tree

2 files changed

+9
-1
lines changed

2 files changed

+9
-1
lines changed

src/app/reducers/mainReducer.js

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,13 +45,16 @@ export default (state, action) => produce(state, draft => {
4545
// eslint-disable-next-line max-len
4646
// finds the name by the newIndex parsing through the hierarchy to send to background.js the current name in the jump action
4747
const nameFromIndex = findName(newIndex, hierarchy);
48-
48+
port.postMessage({
49+
test: 'heres a test from the reducer'
50+
})
4951
port.postMessage({
5052
action: 'jumpToSnap',
5153
payload: snapshots[newIndex],
5254
index: newIndex,
5355
name: nameFromIndex,
5456
tabId: currentTab,
57+
newProp: 'newPropFromReducer'
5558
});
5659
clearInterval(intervalId);
5760

src/extension/contentScript.ts

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,15 +25,20 @@ window.addEventListener('message', msg => { // runs automatically every second
2525
chrome.runtime.onMessage.addListener(request => { // seems to never fire
2626
// send the message to npm package
2727
const { action }: { action: string } = request;
28+
console.log(request);
2829
switch (action) {
2930
case 'jumpToSnap':
31+
console.log('This is the request inside of jumpToSnap inside of the contentScripts, request:', request);
3032
chrome.runtime.sendMessage(request);
3133
window.postMessage(request, '*');
3234
break;
3335
case 'setLock':
3436
case 'setPause':
3537
window.postMessage(request, '*');
3638
break;
39+
case 'onHover':
40+
//wtf does this do??
41+
window.postMessage(request, '*');
3742
default:
3843
break;
3944
}

0 commit comments

Comments
 (0)