Skip to content

Instantly share code, notes, and snippets.

@drinkmaker
Created February 8, 2020 08:04
Show Gist options
  • Save drinkmaker/be6ba58e0b2d240f3a3eb5a85d9343f2 to your computer and use it in GitHub Desktop.
Save drinkmaker/be6ba58e0b2d240f3a3eb5a85d9343f2 to your computer and use it in GitHub Desktop.
Content Protector: What if the user disables JavaScript in the browser settings?
<noscript>
<div id="t42-content-protector-js-disabled">
<div><h3>Please Enable JavaScript in your Browser to Visit this Site.</h3></div>
</div>
<style>
#t42-content-protector-js-disabled {
position: fixed;
top: 0;
left: 0;
height: 100%;
width: 100%;
z-index: 999999;
text-align: center;
background-color: #FFFFFF;
color: #000000;
font-size: 40px;
display: flex;
align-items: center;
justify-content: center;
}
</style>
</noscript>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment