warn.html 974 B

12345678910111213141516171819202122232425262728293031323334353637383940
  1. {{ define "main" }}
  2. <div class="container warn">
  3. <h1>Warning</h1>
  4. <p>This website contains mature content meant for adults and is not suitable for minors.</p>
  5. <p>By clicking the link below you certify you are over the age of majority in your country.</p>
  6. <p>Consumer discretion is advised.</p>
  7. <a id="warn-certify" class="warn-certify" href="/" onclick="return warnCertify();">Let me in.</a>
  8. </div>
  9. <script>
  10. window.onload = onLoad;
  11. function onLoad() {
  12. if (!window.URLSearchParams) {
  13. return;
  14. }
  15. var params = new URLSearchParams(window.location.search);
  16. if (!params.has(`redirectURI`))
  17. {
  18. return;
  19. }
  20. var redirectURI = params.get(`redirectURI`);
  21. document.getElementById(`warn-certify`).href = redirectURI;
  22. }
  23. function warnCertify() {
  24. window.localStorage.setItem('warned', true);
  25. return true;
  26. }
  27. </script>
  28. {{ end }}