Skip to content
Permalink
Browse files

Fix if condition in Code4Lib Journal translator (#1721)

  • Loading branch information...
bencomp authored and adam3smith committed Aug 24, 2018
1 parent 2b85a07 commit f14dbb79f99c39cb7d9b90e5c998b8fd4a5bdda6
Showing with 2 additions and 2 deletions.
  1. +2 −2 Code4Lib Journal.js
@@ -9,15 +9,15 @@
"inRepository": true,
"translatorType": 4,
"browserSupport": "gcsibv",
"lastUpdated": "2018-03-05 07:15:21"
"lastUpdated": "2018-08-23 11:15:21"
}

// attr()/text() v2
function attr(docOrElem,selector,attr,index){var elem=index?docOrElem.querySelectorAll(selector).item(index):docOrElem.querySelector(selector);return elem?elem.getAttribute(attr):null;}function text(docOrElem,selector,index){var elem=index?docOrElem.querySelectorAll(selector).item(index):docOrElem.querySelector(selector);return elem?elem.textContent:null;}


function detectWeb(doc, url) {
if (getSearchResults(doc, true) {
if (getSearchResults(doc, true)) {
return "multiple";
} else if (text(doc, 'h1[class="articletitle"]')) {
return "journalArticle";

0 comments on commit f14dbb7

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