![FoF Night Mode](https://cdn.flarum.com/assets/extension-icon/6804c1ed-a9d7-423f-a11c-70e0d71571d6.png)
FoF Night Mode
fof/nightmode
Add a Night Mode option for your users to use on your Flarum forum
- Downloads
- 50,426
- Version control
- github.com/FriendsOfFlarum/nightmode
- Discuss
- discuss.flarum.org/d/21492
Night Mode by FriendsOfFlarum
A Flarum extension. Add a Night Mode 🌙 for your users to use on your Flarum forum! (THE LIGHT 🌞, IT BUUUURNSSS!!!)
- A new "Night Mode" menu option will appear in your user options when you click on your avatar next to the notifications icon.
- A "Day Mode" option has been added as well to make the light appear again! (BEGONE, DANKESS!)
Installation
Install manually with composer:
composer require fof/nightmode:"*"
Updating
composer update fof/nightmode
Integrating with fof/nightmode
from another extension
Each time the mode is switched from day
to night
(and vice versa), a fofnightmodechange
event is dispatched. An extension can then listen to this event to react to this change, like so:
if (flarum.extensions['fof-nightmode']) {
document.addEventListener('fofnightmodechange', (event) => {
if (event.detail == 'day') {
console.log('day mode');
} else {
console.log('night mode');
}
});
}
Links
An extension by FriendsOfFlarum.
Versions
-
Version 1.6.0.
Likely works with Flarum v1.8.9.
Unlikely to work with Flarum v2.0.0-beta.2.
-
41 additional versions.
-
Extension created.