diff --git a/.nojekyll b/.nojekyll index 3e81d05..5ffd85f 100644 --- a/.nojekyll +++ b/.nojekyll @@ -1 +1 @@ -f4dcd538 \ No newline at end of file +60c06bea \ No newline at end of file diff --git a/chapters/support.md b/chapters/support.md index 5653499..ac14ba9 100644 --- a/chapters/support.md +++ b/chapters/support.md @@ -15,7 +15,6 @@ author: affiliation-url: https://ouhsc.edu/bbmc/ email: wibeasley@hotmail.com orcid: 0000-0002-5613-5006 - attributes: csl: ../assets/csl/apa-7e.csl diff --git a/index.html b/index.html index f2f41ff..e7a4e90 100644 --- a/index.html +++ b/index.html @@ -2,7 +2,7 @@ - + @@ -31,6 +31,7 @@ + @@ -166,13 +167,13 @@
@@ -485,18 +503,7 @@

Licensing

} return false; } - const clipboard = new window.ClipboardJS('.code-copy-button', { - text: function(trigger) { - const codeEl = trigger.previousElementSibling.cloneNode(true); - for (const childEl of codeEl.children) { - if (isCodeAnnotation(childEl)) { - childEl.remove(); - } - } - return codeEl.innerText; - } - }); - clipboard.on('success', function(e) { + const onCopySuccess = function(e) { // button target const button = e.trigger; // don't keep focus @@ -528,7 +535,29 @@

Licensing

}, 1000); // clear code selection e.clearSelection(); + } + const getTextToCopy = function(trigger) { + const codeEl = trigger.previousElementSibling.cloneNode(true); + for (const childEl of codeEl.children) { + if (isCodeAnnotation(childEl)) { + childEl.remove(); + } + } + return codeEl.innerText; + } + const clipboard = new window.ClipboardJS('.code-copy-button:not([data-in-quarto-modal])', { + text: getTextToCopy }); + clipboard.on('success', onCopySuccess); + if (window.document.getElementById('quarto-embedded-source-code-modal')) { + // For code content inside modals, clipBoardJS needs to be initialized with a container option + // TODO: Check when it could be a function (https://github.com/zenorocha/clipboard.js/issues/860) + const clipboardModal = new window.ClipboardJS('.code-copy-button[data-in-quarto-modal]', { + text: getTextToCopy, + container: window.document.getElementById('quarto-embedded-source-code-modal') + }); + clipboardModal.on('success', onCopySuccess); + } var localhostRegex = new RegExp(/^(?:http|https):\/\/localhost\:?[0-9]*\//); var mailtoRegex = new RegExp(/^mailto:/); var filterRegex = new RegExp('/' + window.location.host + '/'); @@ -536,7 +565,7 @@

Licensing

return filterRegex.test(href) || localhostRegex.test(href) || mailtoRegex.test(href); } // Inspect non-navigation links and adorn them if external - var links = window.document.querySelectorAll('a[href]:not(.nav-link):not(.navbar-brand):not(.toc-action):not(.sidebar-link):not(.sidebar-item-toggle):not(.pagination-link):not(.no-external):not([aria-hidden]):not(.dropdown-item):not(.quarto-navigation-tool)'); + var links = window.document.querySelectorAll('a[href]:not(.nav-link):not(.navbar-brand):not(.toc-action):not(.sidebar-link):not(.sidebar-item-toggle):not(.pagination-link):not(.no-external):not([aria-hidden]):not(.dropdown-item):not(.quarto-navigation-tool):not(.about-link)'); for (var i=0; iLicensing } }); +