chrome-extensionHow to fetch data in content script
fetch('https://example.org/some') .then(response => response.text()) .then(response => console.log(response))ctrl + c
sample url to fetch data from
let's assume we're fetching text data
do something with response
More of Chrome Extension
- Get active tab ID
- How to add jQuery support to content script in Chrome extension.
- How to simulate keypress/keyup/keydown event on a page
- How to do a POST request
- Manifest V3 example for Chrome extension.
- How to execute content script after page content is loaded
- How to listen for button click in popup script
- How to access page variables
See more codes...