Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

IEEE Xplore: Remove detect web check for top-frame #3322

Merged
merged 2 commits into from
Jun 19, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 1 addition & 2 deletions IEEE Xplore.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
"inRepository": true,
"translatorType": 4,
"browserSupport": "gcsibv",
"lastUpdated": "2023-09-24 03:17:24"
"lastUpdated": "2024-06-19 07:53:06"
}

/*
Expand Down Expand Up @@ -37,7 +37,6 @@

function detectWeb(doc, url) {
Zotero.monitorDOMChanges(doc.querySelector('.global-content-wrapper'));
if (doc.defaultView !== null && doc.defaultView !== doc.defaultView.top) return false;

if (/[?&]arnumber=(\d+)/i.test(url) || /\/document\/\d+/i.test(url)) {
var firstBreadcrumb = ZU.xpathText(doc, '(//div[contains(@class, "breadcrumbs")]//a)[1]');
Expand Down Expand Up @@ -151,7 +150,7 @@
let bibtexURL = "/rest/search/citation/format?recordIds=" + arnumber + "&fromPage=&citations-format=citation-abstract&download-format=download-bibtex";
Z.debug(bibtexURL);
// metadata is downloaded in a JSON data field
let bibtex = await requestJSON(bibtexURL, { headers: { Referer: url} });

Check failure on line 153 in IEEE Xplore.js

View workflow job for this annotation

GitHub Actions / Lint, Check, Test

A space is required before '}'
bibtex = bibtex.data;
bibtex = ZU.unescapeHTML(bibtex.replace(/(&[^\s;]+) and/g, '$1;'));
// remove empty tag - we can take this out once empty tags are ignored
Expand Down
Loading