Bug #6857
open
Make COINS work with Chrome (and other browser) extensions
Added by Lauren Walker about 9 years ago.
Updated over 8 years ago.
Description
browser plug-ins that check for COINS will check upon initial page load only. This causes a problem with MetacatUI which adds the COINS after the initial page load via Javascript. We should create a mechanism for users to get their citation info from the search page using their browser plug-in -- possibly adding a button that will open a new tab/window with the COINS already loaded?
- Target version changed from 1.8.1 to 1.9.0
- Target version changed from 1.9.0 to 1.12.0
- Target version changed from 1.12.0 to 1.11.0
- Target version changed from 1.11.0 to 1.12.0
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.
See: https://forums.zotero.org/discussion/3173/fire-zotero-action-on-ajax-action?page=1#Item_8
And: https://www.zotero.org/support/dev/translators
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);
document.dispatchEvent(ev);
- Target version changed from 1.12.0 to 1.X.0
Also available in: Atom
PDF