Make COINS work with Chrome (and other browser) extensions
#5 Updated by Matt Jones about 5 years ago
Lauren -- I think the key is to make the various plugins aware that a change occurred. In Zotero, this can be done with a custom site translator. There's a bit of information online in the Zotero forums, and I found this particularly helpful:
My code tells Zotero to listen for two custom events -- bibdatachanging and bibdatachanged. The former calls Zotero_Browser.contentHide(), and the latter calls Zotero_Browser.contentLoad(). I just fire one manually before I refresh my result div and the other after, and Zotero becomes aware of the new data just fine.
#6 Updated by Matt Jones about 5 years ago
I also found this page, which explicitly shows how to tell Zotero that page has changed: https://www.zotero.org/support/dev/exposing_metadata#force_zotero_to_refresh_metadata
Websites for which metadata changes without a page reload should fire a ZoteroItemUpdated event to tell Zotero to re-detect metadata on the page. This is supported in Zotero 3.0 and later.
var ev = document.createEvent('HTMLEvents');
ev.initEvent('ZoteroItemUpdated', true, true);