I'm not sure if this is possible but let's say I have a few variables :
var1 "text1'
var2 "2018"
var3 "[email protected]"
Can I make Applescript to found every instance of this text on Safari (any tab) and change the colour of the text? (
"document.getElementById("foundhtmlhere").style.color = "#ff0000";"
or
document.querySelector("td > a").style.backgroundColor = "red";
--
I'm sure there is a better option, perhaps using JavaScript String search() / selector but I'm still have to go through this. I guess I can search within the body using this, then maybe using text delimiter ? I'm a bit lost
tell application "Safari"
tell document 1
set body to do JavaScript "document.body.innerHTML"
set body to do JavaScript "document.getElementsByTagName('body').item(0).innerHTML"
end tell
end tell
return body