~gg/blog-theme

ref: e7ae86fe9766831706ab0a2bcb4f7a4b698ecd19 blog-theme/layouts/partials/noscript.html -rw-r--r-- 551 bytes
e7ae86fe — Gui Goncalves Remove duplication and unnecessary templates 7 months ago
                                                                                
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
<script type="text/javascript">
 function ready(fn) {
   if (document.readyState != 'loading'){
     fn();
   } else {
     document.addEventListener('DOMContentLoaded', fn);
   }
 }
 ready(() => {
   const h1 = document.createElement('h1');
   const a = document.createElement('a');

   h1.innerText = 'Please disable JavaScript';
   h1.id = 'disable-js-banner';
   a.setAttribute('href', '{{ .Site.Params.noJSLink }}');
   a.appendChild(h1);

   document.body.appendChild(a);
 });

</script>
<script src="{{ .Site.BaseURL }}js/mystify.js"></script>