This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const fetchStockData = async (symbol) => { | |
const url = `https://query1.finance.yahoo.com/v7/finance/quote?symbols=${symbol}`; | |
const response = await fetch(url); | |
const data = await response.json(); | |
return data.quoteResponse.result[0]; | |
}; | |
fetchStockData("AAPL").then(stock => console.log(stock)); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"manifest_version": 3, | |
"name": "My Chrome Extension", | |
"version": "1.0", | |
"description": "A simple Chrome extension boilerplate.", | |
"permissions": ["storage", "activeTab", "scripting"], | |
"background": { | |
"service_worker": "background.js" | |
}, | |
"action": { |