diff --git a/js/privatebin.js b/js/privatebin.js index 45bd2501..bf30a526 100644 --- a/js/privatebin.js +++ b/js/privatebin.js @@ -4577,6 +4577,11 @@ jQuery.PrivateBin = (function($, RawDeflate) { */ function isInsecureConnection() { + // use .isSecureContext if available + if (window.isSecureContext === true || window.isSecureContext === false) { + return !window.isSecureContext; + } + const url = new URL(window.location); // HTTP is obviously insecure diff --git a/tpl/bootstrap.php b/tpl/bootstrap.php index eec38072..d14dcccf 100644 --- a/tpl/bootstrap.php +++ b/tpl/bootstrap.php @@ -72,7 +72,7 @@ if ($MARKDOWN): endif; ?> - + @@ -91,7 +91,6 @@ if ($isCpct): endif; if ($isDark): ?> class="dark-theme">