From fdad82c2b8378ad6f0532fbf2668b123f962e596 Mon Sep 17 00:00:00 2001 From: Roger Espinosa Date: Thu, 21 Dec 2023 09:05:51 -0500 Subject: [PATCH] avoid non existent nameresolver --- src/js/text/viewers/viewer-mirador.js | 14 +++++ templates/text/langmap.en.xml | 1 + templates/text/qbat/qbat.pageviewer.xsl | 2 +- .../text/qui/includes/qui.header-common.xsl | 9 ++- templates/text/qui/qui.header.xsl | 20 ++++--- templates/text/qui/qui.pageviewer.xsl | 56 ++++++++++++------- 6 files changed, 70 insertions(+), 32 deletions(-) diff --git a/src/js/text/viewers/viewer-mirador.js b/src/js/text/viewers/viewer-mirador.js index 86e65da..4bb441e 100644 --- a/src/js/text/viewers/viewer-mirador.js +++ b/src/js/text/viewers/viewer-mirador.js @@ -164,6 +164,20 @@ window.addEventListener('message', (event) => { history.pushState({}, document.title, newHref); document.querySelector('.breadcrumb li:last-child').setAttribute('href', newHref); + const bookmarkItem = document.querySelector('dt[data-key="bookmark-item"] + dd span.url'); + if ( bookmarkItem ) { + let itemHref = bookmarkItem.innerText.trim(); + if ( itemHref.indexOf('/cgi/') > -1 ) { + // just use newHref + bookmarkItem.innerText = newHref; + } else { + // just pop on the new seq? + let tmp = itemHref.split('/'); + tmp[tmp.length - 1] = newSeq.replace(/^0+/, ''); + bookmarkItem.innerText = tmp.join('/'); + } + } + tocbot.refresh(); ScreenReaderMessenger.getMessenger().say(`Viewing ${label}`); diff --git a/templates/text/langmap.en.xml b/templates/text/langmap.en.xml index c5f16ac..603747c 100644 --- a/templates/text/langmap.en.xml +++ b/templates/text/langmap.en.xml @@ -439,6 +439,7 @@ more_vert + scan Item Information Browse: Collection Contents Browse: Collection Contents diff --git a/templates/text/qbat/qbat.pageviewer.xsl b/templates/text/qbat/qbat.pageviewer.xsl index 390b59a..d274255 100644 --- a/templates/text/qbat/qbat.pageviewer.xsl +++ b/templates/text/qbat/qbat.pageviewer.xsl @@ -476,7 +476,7 @@ - + diff --git a/templates/text/qui/includes/qui.header-common.xsl b/templates/text/qui/includes/qui.header-common.xsl index bc7b255..75a0e21 100644 --- a/templates/text/qui/includes/qui.header-common.xsl +++ b/templates/text/qui/includes/qui.header-common.xsl @@ -61,7 +61,12 @@ Link to this Item - https://name.umdl.umich.edu/ + + / + + / + + / @@ -979,7 +984,7 @@ - + diff --git a/templates/text/qui/qui.header.xsl b/templates/text/qui/qui.header.xsl index a3cf8ae..36dd1d9 100644 --- a/templates/text/qui/qui.header.xsl +++ b/templates/text/qui/qui.header.xsl @@ -61,15 +61,17 @@ - - - - - - + + + + + + + + + + + diff --git a/templates/text/qui/qui.pageviewer.xsl b/templates/text/qui/qui.pageviewer.xsl index 638aff1..ba5ed31 100644 --- a/templates/text/qui/qui.pageviewer.xsl +++ b/templates/text/qui/qui.pageviewer.xsl @@ -509,26 +509,42 @@ --> - - Link to this Item - - - https://name.umdl.umich.edu/ - - - - - / - - - - - - - - - - + + + + + + + Link to this + + + + / + + / + + / + + + + + / + + + + + + + / + + + + + + + +