How to put javascript in Discourse theme?

I wouldn’t recommend linking an external javascript if you don’t know how reliable it is. If the remote script change, it could break your forum.

I suggest you create a new theme component in your admin panel instead. Name it something like “snowflake effect”.

Edit this new theme component.

  1. In the Head tab, copy-paste the javascript code inside a <script> HTML tag.

  2. In the CSS tab, paste the CSS code, without the height: 100vh; part in body {.

  3. In the Footer tab, paste 176 times :grimacing: <div class="snow"></div>.

  4. Enjoy your snow.

:warning: Note that this effect was created by someone in their own HTML environment, isn’t “Discourse-compatible” out of the box and thus it may cause issues on your forum.