[Chrome Extension] Content Script
keywords: chrome.runtime.getURL()
Content Script @ Chrome Developer
Content scripts 是用來在瀏覽器網頁上執行的檔案,透過 content script 可以取得網頁內容,改變 DOM,並且傳送資訊到擴充套件。
⚠️ content script 並非可以直接使用所有 chrome 提供的 API,其中可以直接使用
i18n,storage, runtime 裡的runtime.connect,runtime.getManifest,runtime.getURL,runtime.id,runtime.onConnect,runtime.onMessage,runtime.sendMessage。