xiaoxiaobai5724 what's the goal? This isn't a user friendly approach to anything (?)
The custom footer obviously expects valid HTML code. Flarum doesn't validate the input. Like you saw, it's not applied to the admin so unless you log out you should be able to easily change it back. Otherwise you can edit the value in the database settings
table.
If you want to put Flarum into maintenance mode, you can add the key 'offline' => true,
to config.php
. It does block access to the admin panel as well. There is also a more advanced maintenance extension https://discuss.flarum.org/d/23930-maintenance-mode Depending on your hosting, you might also have the ability to create user-friendly maintenance pages directly in your management panel.
Throwing javascript errors / breaking the single page app won't prevent users from using the REST API directly if that's something your community does.