mirror of
https://github.com/flarum/core.git
synced 2025-07-26 19:20:21 +02:00
Allow the first post to be hidden
This commit is contained in:
@@ -81,6 +81,14 @@ app.initializers.replace('boot', () => {
|
||||
mapRoutes(app.routes, basePath)
|
||||
);
|
||||
|
||||
if (m.route.param('hideFirstPost')) {
|
||||
extend(PostStream.prototype, 'view', vdom => {
|
||||
if (vdom.children[0].attrs['data-number'] === 1) {
|
||||
vdom.children.splice(0, 1);
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
// Initialize FastClick, which makes links and buttons much more responsive on
|
||||
// touch devices.
|
||||
$(() => {
|
||||
|
Reference in New Issue
Block a user