https://github.com/friendsofflarum/nightmode
🌙 Turn off the lights!
https://github.com/friendsofflarum/nightmode
dark extension flarum flarum-extension forum friendsofflarum hacktoberfest light lights night-mode
Last synced: 11 months ago
JSON representation
🌙 Turn off the lights!
- Host: GitHub
- URL: https://github.com/friendsofflarum/nightmode
- Owner: FriendsOfFlarum
- License: mit
- Created: 2018-03-30T11:12:29.000Z (about 8 years ago)
- Default Branch: master
- Last Pushed: 2024-10-19T10:07:39.000Z (over 1 year ago)
- Last Synced: 2025-06-29T11:31:50.008Z (11 months ago)
- Topics: dark, extension, flarum, flarum-extension, forum, friendsofflarum, hacktoberfest, light, lights, night-mode
- Language: PHP
- Homepage: https://discuss.flarum.org/d/21492-friendsofflarum-night-mode
- Size: 1.42 MB
- Stars: 35
- Watchers: 7
- Forks: 22
- Open Issues: 6
-
Metadata Files:
- Readme: README.md
- License: LICENSE
- Codeowners: .github/CODEOWNERS
Awesome Lists containing this project
README
# Night Mode by FriendsOfFlarum
[](https://github.com/fof/nightmode/blob/master/LICENSE)
[](https://github.com/FriendsOfFlarum/nightmode)
[](https://packagist.org/packages/fof/nightmode)
A [Flarum](http://flarum.org) 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:
```sh
composer require fof/nightmode:"*"
```
### Updating
```sh
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:
```js
if (flarum.extensions['fof-nightmode']) {
document.addEventListener('fofnightmodechange', (event) => {
if (event.detail == 'day') {
console.log('day mode');
} else {
console.log('night mode');
}
});
}
```
### Links
[
](https://opencollective.com/fof/donate)
- [Packagist](https://packagist.org/packages/fof/nightmode)
- [GitHub](https://github.com/FriendsOfFlarum/nightmode)
- [ReFlar's Night Mode](https://packagist.org/packages/reflar/nightmode)
An extension by [FriendsOfFlarum](https://github.com/FriendsOfFlarum).