diff --git a/client/index.pug b/client/index.pug index 4f5a8e84..a40194f7 100644 --- a/client/index.pug +++ b/client/index.pug @@ -17,8 +17,13 @@ head if canon_url link(rel="canonical", href=canon_url) - if !noscript && process.env.NOSCRIPT_REDIR - noscript: meta(http-equiv='refresh', content="0; url='?nojs'") + if !noscript + noscript + if process.env.NOSCRIPT_REDIR + meta(http-equiv='refresh', content="0; url='?nojs'") + else + style. + .nojs-shim { padding: 15vh 24px; text-align: center } base(href=process.env.BASE_HREF || '/') @@ -43,5 +48,10 @@ body(lang=lang, dir=dir) } if !noscript + if !process.env.NOSCRIPT_REDIR + noscript + .nojs-shim + p This block explorer needs JavaScript to run. Please enable it and reload the page. + script(src=staticRoot+'app.js', async) != process.env.FOOT_HTML diff --git a/flavors/blockstream/config.env b/flavors/blockstream/config.env index bae7fb43..2e5e5be1 100755 --- a/flavors/blockstream/config.env +++ b/flavors/blockstream/config.env @@ -31,7 +31,8 @@ export ONION_V3="http://explorerzydxu5ecjrkwceayqybizmpjjznk5izmitf2modhcusuqlid export CUSTOM_ASSETS="$CUSTOM_ASSETS flavors/blockstream/www/*" export CUSTOM_CSS="$CUSTOM_CSS flavors/blockstream/extras.css" -export NOSCRIPT_REDIR=1 +# show a "needs JavaScript" message instead of redirecting to the prerenderer +export NOSCRIPT_REDIR= export NAVBAR_HTML=1