Should probably consider extending the php side of things instead of the javascript. In the future when interphasing with the Flarum API is more prevalent, this extension would be useless. For instance, in RSS feeds, the full content would be shown.
But regardless, it seems to work well for most cases.