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

Use PMID endpoint instead of web translator #161

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

mvolz
Copy link
Contributor

@mvolz mvolz commented Sep 11, 2023

Use PMID endpoint instead of web translator
for pubmed links as this is the more "polite"
way of accessing PubMed.

Change-Id: Ic3c1a661db65ddc5442f9eaae580275b4fa3499f

Use PMID endpoint instead of web translator
for pubmed links as this is the more "polite"
way of accessing PubMed.

Change-Id: Ic3c1a661db65ddc5442f9eaae580275b4fa3499f
@mvolz
Copy link
Contributor Author

mvolz commented Oct 10, 2023

@dstillman Does this look okay?


WebSession.prototype.cleanPMIDFromURL = function (url) {
let pmid = null;
let pmidMatch = decodeURIComponent(url).match(/^https?:\/\/www.ncbi.nlm.nih.gov\/pubmed\/(\d+)\/?/);
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't think the trailing \/? would be doing anything here.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

2 participants