I am going to state this feature request in two ways, once in english and once in computer gibberish.
Ok, first in English: I would like devonagent and devonthink to provide access to ALL the images on the finally rendered page. I need this because about 80% of what I use my computer for is accessing journals via our university system. And the aggravating and idiotic thing about half of these systems is that they, (like googlebooks), don’t allow one to easily grab a single image displayed on the screen. They do this through all sorts of silly idiotic methods involving iframes, which one can readily get around by (for example) looking at the “Activity” window in Webkit and downloading the image directly. I would love it if devonagent’s image list included all images that were displayed in the current browser, regardless of whether iframes have been used. I think it is wholly legitimate to be able to store any image I can see on my browser, and frankly webkit/safari allows me to do this. So why shouldn’t devonagent allow me to quickly drop those images into devonthink? So I would request that all images displayed in the browser window be available in the image list.
Ok, second time, in computer gibberish. What I’d really like is for devonagent to have scripable access to the entire DOM chain of the browser via Javascript. Newer versions of Webkit nightly are actually getting close to this. If I open a javascript console in Webkit while browsing googlebooks or one of my library’s protected book pages, I can enter the command “document.images” in the console, and get the whole list of rendered images URLs. Unfortunately if I use this code:
tell application "WebKit"
set the_tab to current tab of window 1
set x to do JavaScript "document.images" in the_tab
log x
end tell
Webkit returns a pathetic string: “[object HTMLDivElement]”
It is very frustrating to see that the Webkit javascript console will provide a list of all the tags but not return it via script. It’s frustrating as well that devonagent returns nothing. I would really like to be able to parse the finally rendered page…so many web programs modify the page as it was originally sent, and the crucial data is stored in the DOM (or so called .outerHTML )
So what I’d like to see is really two things: the ability for Devonthink to provide all the images in the finally rendered (post-Javascript) html / DOM chain and the ability to access this DOM with a script, and thus be able to do things like ask for
set x to do JavaScript "document.getElementById('divPage0')" in the_tab
Since I have no idea how difficult this is, I would suggest this. I know that the two requests are linked logically, I don’t know which one is more difficult. But what I can say is that if it is not that hard to provide a Javascript console to Devonagent that would allow scriptable callbacks and would be capable of returning all document DOM calls as strings, that alone would make Devonthink more useful to me than any other browser. It would be great if it worked in Devonthink as well, as I notice that devonthink these days responds to Javascript commands almost as well as devonagent (which isn’t to say it’s great, but what works, works.)
Please consider these requests seriously. The truth is that much “information work” occurs beyond password/cookie/iframe walls that really thwart much of what needs to be done. The ability to access the DOM tree as rendered and modified is a huge issue that will be part of all future browser discussions, and I’d like to see Devonthink/Devonagent arrive at the future first.
cheers,
Eric
btw, Christian, I’m happy to provide you with password/access to test this…