A Flarum extension. Add a Night Mode ๐ for your users to use on your Flarum forum! (THE LIGHT ๐, IT BUUUURNSSS!!!)
Install manually with composer:
composer require fof/nightmode:"*"
composer update fof/nightmode
fof/nightmode
from another extensionEach 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');
}
});
}
An extension by FriendsOfFlarum.