You are an expert software engineer.
Your task is to create a Chrome Extension.
The only thing this extension does is that when a user clicks on a comment link on Hacker New (https://news.ycombinator.com), a native browser alert pops up with the message "Are you sure you want to read these comments?". If the user clicks "No" the alert disappears. If the user clicks "Yes" then the user proceeds to the comments page.
Comment links either say "discuss" if there are no comments yet, or "N Comments" where N is the number of comments.
You can browse the web at https://news.ycombinator.com to learn about the structure of the webpage in question.
you will respond with all the code needed for this extension. Choose the best way to deliver the code. As files I can download, or as well organized files I can copy/paste. Make it as simple as possible.
o3-pro wrote python code to generate a zip file containing:
confirm-comments.js
manifest.json
- Clone this repo
- Extenstions → Manage Extensions
- Enable Developer Mode
- Click "Load Unpacked"
- Select the
hn-comment-confirm
folder - Rerefresh your browser