Skip to content

Commit

Permalink
removed debug output
Browse files Browse the repository at this point in the history
  • Loading branch information
step21 committed Jun 28, 2020
1 parent ed566c0 commit 52ed203
Showing 1 changed file with 0 additions and 13 deletions.
13 changes: 0 additions & 13 deletions ResearchGate.js
Expand Up @@ -45,29 +45,16 @@ function attr(docOrElem, selector, attr, index) {
}

function detectWeb(doc, url) {
if (debug) {
Zotero.debug('url: ' + url);
}

if (url.includes('/publication/')) {
if (debug) {
Zotero.debug('Detected something');
Zotero.debug('text: ' + text(doc, "span.research-detail-header-section__badge"));
Zotero.debug('attr: ' + attr(doc, 'span.research-detail-header-section__badge', 'content'));
}
var type = text(doc, "span.research-detail-header-section__badge");
if (!type) {
Zotero.debug('trying different way');
type = text(doc, "b[research-meta-type]");
if (!type) {
// for logged in users (yes, really...)
Zotero.debug('trying logged in way');
type = text(doc, 'b[data-reactid]');
}
}
if (debug) {
Zotero.debug('type: ' + type);
}
// type = type.replace('(PDF Available)', '').trim();
switch (type) {
case "Data":// until we have a data itemType
Expand Down

0 comments on commit 52ed203

Please sign in to comment.