diff --git a/CHANGELOG b/CHANGELOG index 754eb28..88c61f9 100644 --- a/CHANGELOG +++ b/CHANGELOG @@ -1,3 +1,9 @@ +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" (e.g. on https://doi.org/10.1177/13524585251316242) + 02.02.2025 v1.28 * Some adaptations for better integration with the awesome Zotero Cita plugin: https://github.com/diegodlh/zotero-cita. * Slightly changed linkToShareAppendix() logic. diff --git a/bookmarklet.js b/bookmarklet.js index 05bb944..44fc753 100644 --- a/bookmarklet.js +++ b/bookmarklet.js @@ -38,13 +38,13 @@ javascript:(function () { listOfReferences = Array.from(lis).map(x => { // Regular expression adapted from Crossref's recommendation (https://www.crossref.org/blog/dois-and-matching-regular-expressions/) // 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 - id = decodeURIComponent(x.innerHTML).match(/10\.\d{4,9}\/[-._;()/:A-Z0-9]+[-_()/:A-Z0-9]+/gi) + id = decodeURIComponent(encodeURIComponent(x.innerHTML)).match(/10\.\d{4,9}\/[-._;()/:A-Z0-9]+[-_()/:A-Z0-9]+/gi) if (id) { // Make sure DOI fetched for this reference is not sourceDOI return (id && id.map(id => id.toUpperCase()).filter(id => id !== sourceDOI)[0]) // If no DOI try PMID } else { - // Try to fet PMID from pubmed itself + // Try to get PMID from pubmed itself pubmed_a = x.querySelectorAll('a.reference-link:not([href*=\'pmc\'])') if (pubmed_a.length && pubmed_a[0].attributes['data-ga-action']) { id = pubmed_a[0].attributes['data-ga-action'].value diff --git a/index.html b/index.html index 9b34c1c..64bb563 100644 --- a/index.html +++ b/index.html @@ -16,8 +16,8 @@ } ::-webkit-scrollbar { - height: 6px; - width: 6px; + height: 0.4rem; + width: 0.4rem; } ::-webkit-scrollbar-thumb { @@ -26,7 +26,7 @@ } html { - font-size: 9pt; + font-size: 10pt; overflow-y: auto; } @@ -60,7 +60,7 @@ } div.content { - padding-top: 10px + padding-top: 0.2rem } .tab-item { @@ -79,12 +79,8 @@ padding: 0.5rem 0.2rem } - .navbar-end button, h2 button { - width: 40px; - } - - .navbar-end .buttons .button { - width: 45px + .navbar-end button, h2 button, .navbar-end .buttons .button { + width: 3.8rem } h2 label.upload { @@ -136,11 +132,10 @@ /* Vis.js Network tooltip */ div.vis-tooltip { - font-size: 0.8em; white-space: normal; - max-width: 250px; + max-width: 20vw; word-wrap: break-word; - padding: 5px; + padding: 0.5vw; } @@ -162,8 +157,8 @@