You can get the site's contents, update storage, or do any action you would typically do through an extension of the Chrome Dev Tools.
[0:12] The simplest thing we can do is just get the inner text, so the entire content of the site. We can do these exact same actions in Script Kit. I'll say get site content, create this script. This requires some AppleScript, which I'll paste in and explain. The AppleScript helper will run this.
[1:03] We'll go ahead and run getSiteContent. Hit Enter. You can see the raw content of the site. We could also do this using things like querySelector(), do querySelectorAll(). Make sure to use single quotes since we're operating inside of double quotes down here.
[1:27] We can grab all the h2s, and then let me format this a little bit. We'll convert this into an array. Then map the elements and get the element's inner text. Then join to turn it into a string. Make sure and use those single quotes again. Then we'll run our getSiteContent.
[1:50] Hit Enter and you can see all of the h2s. It's just a string and we could have joined in a way to split on the string or however you want to access the data. We can also do things like access the local storage, produce set item. We'll say, "Script Kit is awesome."
[2:13] Then we'll run getSiteContent again. This time it didn't return a value so you see missing value as the string there. If we run local storage and getItem Script Kit from here, hit Enter, you'll see is awesome.
[2:32] You have full control to do whatever you want with the site that you could do in the Chrome Dev tools.