Skip to content

Commit b6e9041

Browse files
committed
15.03.2025 v1.29
* Slightly increased standard font size from 9pt to 10pt for better readability. * Made CSS layout more flexible by replacing most px measures in rem. * Bumped vis.js Network to newest versions. ! Fixed bugmarklet, in rare cases decodeURIComponent(x.innerHTML) caused an "URIError: malformed URI sequence"
1 parent 79e88e3 commit b6e9041

File tree

5 files changed

+81
-69
lines changed

5 files changed

+81
-69
lines changed

CHANGELOG

+6
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,9 @@
1+
15.03.2025 v1.29
2+
* Slightly increased standard font size from 9pt to 10pt for better readability.
3+
* Made CSS layout more flexible by replacing most px measures in rem.
4+
* Bumped vis.js Network to newest versions.
5+
! Fixed bugmarklet, in rare cases decodeURIComponent(x.innerHTML) caused an "URIError: malformed URI sequence" (e.g. on https://doi.org/10.1177/13524585251316242)
6+
17
02.02.2025 v1.28
28
* Some adaptations for better integration with the awesome Zotero Cita plugin: https://github.com/diegodlh/zotero-cita.
39
* Slightly changed linkToShareAppendix() logic.

bookmarklet.js

+2-2
Original file line numberDiff line numberDiff line change
@@ -38,13 +38,13 @@ javascript:(function () {
3838
listOfReferences = Array.from(lis).map(x => {
3939
// Regular expression adapted from Crossref's recommendation (https://www.crossref.org/blog/dois-and-matching-regular-expressions/)
4040
// Using the set [-_;()/:A-Z0-9] twice (fullstop . and semicolon ; only in first set) makes sure that the trailing character is neither a fullstop nor semicolon
41-
id = decodeURIComponent(x.innerHTML).match(/10\.\d{4,9}\/[-._;()/:A-Z0-9]+[-_()/:A-Z0-9]+/gi)
41+
id = decodeURIComponent(encodeURIComponent(x.innerHTML)).match(/10\.\d{4,9}\/[-._;()/:A-Z0-9]+[-_()/:A-Z0-9]+/gi)
4242
if (id) {
4343
// Make sure DOI fetched for this reference is not sourceDOI
4444
return (id && id.map(id => id.toUpperCase()).filter(id => id !== sourceDOI)[0])
4545
// If no DOI try PMID
4646
} else {
47-
// Try to fet PMID from pubmed itself
47+
// Try to get PMID from pubmed itself
4848
pubmed_a = x.querySelectorAll('a.reference-link:not([href*=\'pmc\'])')
4949
if (pubmed_a.length && pubmed_a[0].attributes['data-ga-action']) {
5050
id = pubmed_a[0].attributes['data-ga-action'].value

0 commit comments

Comments
 (0)