What's the easiest way to check if a loaded page contains a certain keyword or string? My intent is to execute a function if the text exists anywhere on the page.
The closest thing I've found is:
if (window.location.href.indexOf("my keyword(s)") != -1) {do something}
But this only checks if the URL contains the keyword.