Allow the first post to be hidden

This commit is contained in:
Toby Zerner 2015-12-01 16:42:49 +10:30
parent d78bd82b65
commit d5970ee4a0

View File

@ -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.
$(() => {