Skip to content

Instantly share code, notes, and snippets.

@woganmay
Created February 12, 2017 13:59
Show Gist options
  • Save woganmay/7dedfc0bf6448c39d0e61d31a68366a6 to your computer and use it in GitHub Desktop.
Save woganmay/7dedfc0bf6448c39d0e61d31a68366a6 to your computer and use it in GitHub Desktop.
Modify the Flarum UI
<script type="text/javascript">
var thisHackInterval = setInterval(function(){
// Check if app is available yet
if (typeof(app) == "object")
{
// Set app routes to whatever I need
// This will repaint the DOM automatically
app.routes.settings.path = "https://my.laravel.site/preferences";
// Remove navigation elements I don't want
document.querySelector("li.item-logOut").remove();
document.querySelector("li.Dropdown-separator").remove();
clearInterval(thisHackInterval);
}
}, 500);
</script>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment