Comment

Comment by mdibaiee

For people who want to put something like this, here is the code snippet:

  <span id='browser' class='hidden'>
    This website is designed for <a target="_blank" rel="noopener noreferrer" href="https://firefox.com/">Firefox</a>, a web browser that respects your privacy.
  </span>

  <script>
    if (window.chrome) {
      document.getElementById('browser').className = '';
    }
  </script>
Class .hidden must hide the element somehow, in this case I do:

  .hidden { display: none; }
parent mdibaiee 3 years ago

Discussion

Live from the official Hacker News API

A modern reader for Hacker News · SvelteKit + Skeleton