Longer content previews.

This commit is contained in:
Samuel Clay 2021-01-24 13:55:47 -05:00
parent d3449db1ec
commit a932102b57
2 changed files with 2 additions and 2 deletions

View file

@ -49,7 +49,7 @@ NEWSBLUR.Models.Story = Backbone.Model.extend({
var content = this.get(attribute);
if (!attribute || !content) content = this.story_content();
// First do a naive strip, which is faster than rendering which makes network calls
content = content && content.replace(/<(?:.|\n)*?>/gm, '');
content = content && content.replace(/<(?:.|\n)*?>/gm, ' ');
content = content && Inflector.stripTags(content);
content = content && content.replaceAll(' ', ' '); // Invisible space, boo

View file

@ -206,7 +206,7 @@ NEWSBLUR.Views.StoryTitleView = Backbone.View.extend({
show_content_preview: function() {
var preference = NEWSBLUR.assets.preference('show_content_preview');
if (!preference) return preference;
var max_length = preference == 'small' ? 150 : preference == 'medium' ? 300 : 500;
var max_length = preference == 'small' ? 300 : preference == 'medium' ? 600 : 1000;
if (this.options.override_layout == 'grid' ||
NEWSBLUR.assets.view_setting(NEWSBLUR.reader.active_feed, 'layout') == 'grid') {