An example Chrome extension to showcase an issue where content script does not work as expected for the first time when navigated from chrome://newtab.
- Download the repo zip from: https://github.com/lazyvab/chrome-newtab-issue/archive/refs/heads/master.zip
- Extract the zip.
- Go to chrome://extensions page.
- Enable
Developer mode
from the top right corner of the page. - Click
Load unpacked
and select the extracted folder.
When a website is opened, it should change the page's background to yellow.
- Open https://example.com in a new tab.
- The background of the page is not yellow.
- Reload the page and see that the page's background changes to yellow.