Skip to content

Commit

Permalink
ScienceDirect: Don't add isDTMRedir URL param
Browse files Browse the repository at this point in the history
  • Loading branch information
AbeJellinek committed Oct 3, 2024
1 parent e7d033c commit b7cf975
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions ScienceDirect.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
"inRepository": true,
"translatorType": 4,
"browserSupport": "gcsibv",
"lastUpdated": "2024-06-13 19:43:00"
"lastUpdated": "2024-10-03 14:17:12"
}

function detectWeb(doc, url) {

Check warning on line 15 in ScienceDirect.js

View workflow job for this annotation

GitHub Actions / Lint, Check, Test

Missing license block
Expand Down Expand Up @@ -134,7 +134,7 @@ async function getPDFLink(doc) {
let md5 = urlMetadata.queryParams.md5;
let pid = urlMetadata.queryParams.pid;
if (path && pdfExtension && pii && md5 && pid){

Check warning on line 136 in ScienceDirect.js

View workflow job for this annotation

GitHub Actions / Lint, Check, Test

Missing space before opening brace
pdfURL = `/${path}/${pii}${pdfExtension}?md5=${md5}&pid=${pid}&isDTMRedir=Y`;
pdfURL = `/${path}/${pii}${pdfExtension}?md5=${md5}&pid=${pid}`;
Zotero.debug("Created PDF URL from JSON data: " + pdfURL);
return pdfURL;
}
Expand All @@ -153,7 +153,7 @@ async function getPDFLink(doc) {
// enough to get us through even without those parameters.
pdfURL = attr(doc, 'link[rel="canonical"]', 'href');
if (pdfURL) {
pdfURL = pdfURL + '/pdfft?isDTMRedir=true&download=true';
pdfURL = pdfURL + '/pdfft?download=true';

Check failure on line 156 in ScienceDirect.js

View workflow job for this annotation

GitHub Actions / Lint, Check, Test

Assignment (=) can be replaced with operator assignment (+=)
Zotero.debug("Trying to construct PDF URL from canonical link: " + pdfURL);
return pdfURL;
}
Expand Down

0 comments on commit b7cf975

Please sign in to comment.