Permalink
Browse files
Fix if condition in Code4Lib Journal translator (#1721)
- Loading branch information...
Showing
with
2 additions
and
2 deletions.
-
+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