Could exports.itemType really be defined at any time in detectWeb in Embedded Metadata.js?

9 views
Skip to first unread message

Lennart Borgman

unread,
Jun 29, 2015, 12:32:08 PM6/29/15
to zoter...@googlegroups.com
detetcWeb checks for exports.itemType, but I can't see that it can be defined:

function detectWeb(doc, url) {
//blacklist wordpress jetpack comment plugin so it doesn't override other metadata
if (url.indexOf("jetpack.wordpress.com/jetpack-comment/")!=-1) return false;
if(exports.itemType) return exports.itemType;
init(doc, url, Zotero.done);
}

Maybe that is done somewhere else in the Zotero framework? (At least it is not done in this translators file.)

Lennart Borgman

unread,
Jun 29, 2015, 12:33:02 PM6/29/15
to zoter...@googlegroups.com
Note: I am asking first since I am unsure this is an issue.

Aurimas Vinckevicius

unread,
Jun 29, 2015, 12:35:45 PM6/29/15
to zoter...@googlegroups.com
Yes, it can be defined when called from other translators https://www.zotero.org/support/dev/translators/coding#using_gettranslatorobject

On Mon, Jun 29, 2015 at 11:33 AM, Lennart Borgman <lennart...@gmail.com> wrote:
Note: I am asking first since I am unsure this is an issue.

--
You received this message because you are subscribed to the Google Groups "zotero-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email to zotero-dev+...@googlegroups.com.
To post to this group, send email to zoter...@googlegroups.com.
Visit this group at http://groups.google.com/group/zotero-dev.
For more options, visit https://groups.google.com/d/optout.

Lennart Borgman

unread,
Jun 29, 2015, 12:57:35 PM6/29/15
to zoter...@googlegroups.com
Thanks Aurimas. 
Reply all
Reply to author
Forward
0 new messages