There are 3 parts to this repo:
- Backend Nodejs
- Frontend React
- Chrome Extension
How to Start frontend and backend
$ cd frontend
$ npm run start
- In the VSCODE Debugger run Attach Client+Server
How to start the chrome extension
- chrome://extensions/
- Toggle on developer mode
- Load Unpacked -->
- Chose chrome_ext
Debugging Chrome
content scripts
- DevTools (cmd opt i)
- Sources tab
- Content Scripts tab (Page, Filesystem, expand)
- Expand relevant extension (Dreamy in this case)
- Click relevant content script
- Add break point
background scripts
- Manage Extensions
- Go to extension
- Inspect view service worker (not always visible, should be under ID)
- Sources tab >> Page tab >> expand >> background.js >> inset break point
popup script
- Pin extension to browser bar
- Click Pin
- Right click popup > Inspect
- Sources Tab > popup.js > insert a break point
Make a fake tweet
- Find a tweet to copy
- Inspect
- Find the parent that has a transformY attribute within the inline style attribute. This parent div should have a bunch of siblings with transformY attributes also that each represent a different tweet. Copy the children of this parent div. This your template. You can edit it now, or edit it with dev tools and then copy it.
- Add a new fake tweet on mongo atlas. Add the HTML under the field 'html'
- optional: Add your screen name to 'addedBy' field.
Issues
- polls not display correctly
- only works on light theme
- FIXED background fetch patch returning multiple responses. get tweets is not- thats good.
- front end shows "you missed the dream sign" or "you are a wake" even if dream sign already interacted with.
Features
- Dynamic retweets- retweet from a user that the main user follows.
- alarm thing that Nathan W. said
To do:
- How to count missed vs passed dream signs?