Project by: Solomon [33], Andrea [28]
Inspiration
Wattpad does not allow the following:
- highlighting of text in their DOM
- general copy and paste
- download functionality
What it does
- add download functionality to websites to cater to the user base who would like to keep a copy of the books offline
How I built it
Decided to go with user-script since a standalone server using puppeteer or similar headless- browser would be too CPU intensive and a full stack would take too much time for a 24 hours hackathon
Challenges I ran into and What I learned
- Wattpad is build on React, which does not conform to several elements of vanilla javascript. such as
$(document).ready(). - variables from
documentin current window are lost oncewindow.location.hrefis triggered
Learnt much about the little quirks in JavaScript and how it interacts with React
