mirror of
https://github.com/flarum/core.git
synced 2025-07-27 19:50:20 +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)
|
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
|
// Initialize FastClick, which makes links and buttons much more responsive on
|
||||||
// touch devices.
|
// touch devices.
|
||||||
$(() => {
|
$(() => {
|
||||||
|
Reference in New Issue
Block a user