Is it possible to get javascript object from web?
I found a piece of information was stored in a javascript object in the web page. Is it possible to get the object in the Zotero web translator?
This is an old discussion that has not been active in a long time. Before commenting here, you should strongly consider starting a new discussion instead. If you think the content of this discussion is still relevant, you can link to it from your new discussion.
ZU.xpath(doc, '//script[contains(text(), "something distinctive about the JSON")]')
For anything beyond that, please post to zotero-dev with example URL
```
var g_Summary=new Object()
```
I can get this g_Summary by `ZU.xpath`?
This paper has a long abstract(摘要). The javascript script truncates the string at max 500 words. But you can get full abstract by click(更多).
I checked the javascript code. Click action will trigger `MoerSummary` function. The full abstract is stored in a `g_Summary` object in the `Common.min.js` file.
I hope I can access `g_Summary` to get full abstract.
The may be other, more elegant options (e.g. I wonder if we can just mimick the button click when calling innerHTML or the equivalent), but one option is to reload the page as text via ZU.doGet -- that includes the full abstract text which you can grab via regex.