Skip to content
7 changes: 5 additions & 2 deletions COinS.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,8 @@
"priority": 310,
"inRepository": true,
"translatorType": 6,
"browserSupport": "gcsv",
"lastUpdated": "2021-06-01 17:38:46"
"browserSupport": "gcsibv",
"lastUpdated": "2025-04-08 14:19:53"
}

/*
Expand All @@ -36,6 +36,9 @@
*/

function detectWeb(doc, _url) {
if (!Zotero.parentTranslator) {
return false;
}
var encounteredType = false;

var spans = doc.querySelectorAll('span.Z3988[title]');
Expand Down
5 changes: 4 additions & 1 deletion DOI.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
"inRepository": true,
"translatorType": 4,
"browserSupport": "gcsibv",
"lastUpdated": "2020-03-13 02:38:54"
"lastUpdated": "2025-04-08 14:19:39"
}

/*
Expand Down Expand Up @@ -100,6 +100,9 @@ function getDOIs(doc) {
}

function detectWeb(doc, url) {
if (!Zotero.parentTranslator) {
return false;
}
// Blacklist the advertising iframe in ScienceDirect guest mode:
// http://www.sciencedirect.com/science/advertisement/options/num/264322/mainCat/general/cat/general/acct/...
// This can be removed from blacklist when 5c324134c636a3a3e0432f1d2f277a6bc2717c2a hits all clients (Z 3.0+)
Expand Down
18 changes: 10 additions & 8 deletions Embedded Metadata.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
"inRepository": true,
"translatorType": 4,
"browserSupport": "gcsibv",
"lastUpdated": "2022-01-03 16:51:36"
"lastUpdated": "2025-04-08 14:18:58"
}

/*
Expand Down Expand Up @@ -223,12 +223,14 @@ function completeItem(doc, newItem, hwType) {
newItem.complete();
}

// eslint-disable-next-line consistent-return
function detectWeb(doc, url) {
async function detectWeb(doc, url) {
if (!Zotero.parentTranslator) {
return false;
}
// blacklist wordpress jetpack comment plugin so it doesn't override other metadata
if (url.includes("jetpack.wordpress.com/jetpack-comment/")) return false;
if (exports.itemType) return exports.itemType;
init(doc, url, Zotero.done);
return new Promise(resolve => init(doc, url, resolve));
}

function init(doc, url, callback, forceLoadRDF) {
Expand Down Expand Up @@ -651,10 +653,10 @@ function addOtherMetadata(doc, newItem) {
function addLowQualityMetadata(doc, newItem) {
// if we don't have a creator, look for byline on the page
// but first, we're desperate for a title
if (!newItem.title) {
Z.debug("Title was not found in meta tags. Using document title as title");
newItem.title = doc.title;
}
// if(!newItem.title) {
// Z.debug("Title was not found in meta tags. Using document title as title");
// newItem.title = doc.title;
// }

if (newItem.title) {
newItem.title = newItem.title.replace(/\s+/g, ' '); // make sure all spaces are \u0020
Expand Down
Loading