diff --git a/assets/js/just-the-docs.js b/assets/js/just-the-docs.js index a3253a1..9e767ac 100644 --- a/assets/js/just-the-docs.js +++ b/assets/js/just-the-docs.js @@ -488,6 +488,11 @@ jtd.onReady(function(){ jtd.onReady(function(){ + if (!window.isSecureContext) { + console.log('Window does not have a secure context, therefore code clipboard copy functionality will not be available. For more details see https://web.dev/async-clipboard/#security-and-permissions'); + return; + } + var codeBlocks = document.querySelectorAll('div.highlighter-rouge, div.listingblock > div.content, figure.highlight'); // note: the SVG svg-copied and svg-copy is only loaded as a Jekyll include if site.enable_copy_code_button is true; see _includes/icons/icons.html