SUBSCRIBE OUR YOUTUBE CHANNEL 👉
Join in Google News
If You Want Adsense Approval for your blog Contact Us Adsense Ready theme Now!
Posts

How to make the blog display a warning when JavaScript is turned off in the browser

 










Hi Web Developer! back again with the tech teacher. this time the tech teacher will share a tutorial on how to make a website or blogger display a rejection message or notification when JavaSript is disabled in the browser. For masters, please correct if something is not quite right, but I don't think there is and for newbies who need enlightenment, please follow it on their respective computers. Ok, let's continue the tutorial.

First

Add the following JavaScript, below the opening body <body>

<noscript>
<div class='noscript'>
  <p><span>&#9888;</span></p>
  <p>JavaScript is required to view the content of our site.</p>
  <p>please enable javascript !</p>
</div>
</noscript>

Second

Add the following CSS style, above the closing head tag. </head> .

<noscript>
<style type='text/css'>
body,html{overflow:hidden}
.noscript{background:#03a9f4;color:#fff;padding:8% 0 0 0;position:fixed;bottom:0;left:0;top:0;right:0;z-index:1000;height:auto;-webkit-transform:translateZ(0);transform:translateZ(0);overflow:hide;}
.noscript p{margin:0;text-align:center;padding:0 20px 10px 20px;margin:auto;font-size:2rem;line-height:1.5;font-family:&#39;Julius Sans One&#39;, sans-serif;;max-width:1010px;text-transform:uppercase;font-weight:400;}
.noscript p span{color:red;font-size:10rem;line-height:normal;font-weight:normal;}
</style>
</noscript>
Then Save, for demo please turn off your javascript and open the website https://habibkhan-tech.blogspot.com/ 

Read AlsoHow to prevent a website or blogger from being inspected by the Inspect Element
How to make a website or blog not CTRL+U and right click 

So Hopefully it'll be useful , thank you again.

Post a Comment