zotero/chrome/content/scaffold/templates/scrapeEM.js
2019-08-02 07:00:39 -04:00

21 lines
593 B
JavaScript

function scrape(doc, url) {
var translator = Zotero.loadTranslator('web');
// Embedded Metadata
translator.setTranslator('951c027d-74ac-47d4-a107-9c3069ab7b48');
// translator.setDocument(doc);
translator.setHandler('itemDone', function (obj, item) {
// TODO adjust if needed:
item.section = "News";
item.complete();
});
translator.getTranslatorObject(function (trans) {
trans.itemType = "newspaperArticle";
// TODO map additional meta tags here, or delete completely
trans.addCustomFields({
'twitter:description': 'abstractNote'
});
trans.doWeb(doc, url);
});
}