Skip to content
Permalink
Browse files

SAE Papers.js: Moving meta tags not needed anymore (zotero#1359)

SAE has moved the HighWire meta tags now from the body
to the head part. Thus, the previous fix is not needed
anymore.

See also
https://forums.zotero.org/discussion/comment/279243/#Comment_279243
  • Loading branch information...
zuphilip authored and adam3smith committed Jul 8, 2017
1 parent 60bb359 commit 6d14efa83f34780512df877c51eab6d6ad5c1e73
Showing with 1 addition and 9 deletions.
  1. +1 −9 SAE Papers.js
@@ -9,7 +9,7 @@
"inRepository": true,
"translatorType": 4,
"browserSupport": "gcsibv",
"lastUpdated": "2017-06-24 09:09:38"
"lastUpdated": "2017-07-07 05:40:25"
}

/*
@@ -79,14 +79,6 @@ function getSearchResults(doc, checkOnly) {
}

function scrape(doc, url) {
//the highwire meta tags are now part of the body and not head
//which we have to correct here before calling EM translator
var head = doc.getElementsByTagName('head');
var metasInBody = ZU.xpath(doc, '//body/meta');
for (var i=0; i<metasInBody.length; i++) {
head[0].append(metasInBody[i]);
}

var abstract = ZU.xpathText(doc, '//div[@class="dt-scope" and div/div[contains(text(), "Abstract")]]//div[@class="dt-scope-c-content"]');
var translator = Zotero.loadTranslator('web');
// use the Embedded Metadata translator

0 comments on commit 6d14efa

Please sign in to comment.
You can’t perform that action at this time.