I have small question with developing an Chrome extension.
How can I get a content of page and find a string after it has been loaded?
As a test i prepared something like this:
chrome.tabs.onUpdated.addListener( function (tabId, changeInfo, tab) {
if (changeInfo.status == 'complete')
{
if (document.body.innerHTML.indexof("text to find in HTML") !== -1)
{
console.log("found");
}
}
Manifest V3 shows that it is "server-side" scripting so i can't access to document and i don't know what to do now.
ReferenceError: document is not defined at <URL.>