Skip to main content

How to Add Snowfall Effect for a Specific Space in FluentCommunity

During seasonal events (like Christmas or New Year), many communities want to add a festive snowfall effect. However, the challenge in FluentCommunity is that it uses SPA navigation (no full page reload), so normal scripts will only run after pressing F5.

Here is a ready-to-use SnowFX script that:

  • Runs only on designated spaces (e.g., /forum/space/code/home)
  • Does not run on other spaces or in the admin panel
  • Is SPA-aware β†’ works when you navigate by clicking inside the forum (no refresh needed)
  • Lightweight, vanilla JS (no external libraries)

πŸ”§ Installation

  1. Go to Forum Settings β†’ Customization β†’ Custom JavaScript (screenshot below).
  2. Paste the script into the JavaScript box.
  3. Edit the ALLOWED_SPACES list to include the sub-forums where you want the snow effect.
  4. Save β†’ Done βœ…

πŸ“œ Script (copy & paste)

https://gist.github.com/vanamlevn-creator/59512d1dec68b134c47cbcade92885c9

βœ… Demo

  • Works only on /forum/space/code/home (or any space you define).
  • When you click around inside FluentCommunity, the snow will appear/disappear correctly.
  • No effect in /forum/admin or /wp-admin.

🎁 Bonus

  • You can enable a seasonal mode (only from September to December) by adding a simple date check.
  • Or change cfg.color to yellow and replace flakes with β€œπŸŒΈβ€ to simulate falling petals.

Shahjahan Jewel

Please use gist.github.com or other free (non ads) services. I would appriciate if you change the URL.