# איך לשים JavaScript בערכת נושא של Discourse?

**URL:** <https://meta.discourse.org/t/how-to-put-javascript-in-discourse-theme/246157>\
**Category:** Development\
**Created:** [19 בנובמבר,‏ 2022,‏ 8:49pm UTC](https://meta.discourse.org/t/how-to-put-javascript-in-discourse-theme/246157 "2022-11-19T20:49:19Z")\
**Posts on this page:** 1\
**Showing post:** 8

<div class="post-metadata">

**Author:** ![Canapin](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/canapin/32/119591_2.png) [@Canapin](https://meta.discourse.org/u/Canapin)\
**Post date:** [19 בנובמבר,‏ 2022,‏ 10:24pm UTC](https://meta.discourse.org/t/how-to-put-javascript-in-discourse-theme/246157/8 "2022-11-19T22:24:09Z")

</div>

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](https://docs.google.com/viewer?a=v&pid=sites&srcid=ZGVmYXVsdGRvbWFpbnxub3ZvZWZlaXRvbmV2ZXxneDozNzk3NWFkNTgxNTExNGFm) 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 😬 `<div class="snow"></div>`.

4. Enjoy your snow.

 ![image](https://global.discourse-cdn.com/meta/original/4X/a/4/a/a4aadb28ddca3c1a85a0c5405215f4e102ef286b.jpeg)

⚠ 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.

---

_[View the full topic](https://meta.discourse.org/t/how-to-put-javascript-in-discourse-theme/246157)._
