mirror of
https://github.com/samuelclay/NewsBlur.git
synced 2025-08-05 16:58:59 +00:00
Longer content previews.
This commit is contained in:
parent
d3449db1ec
commit
a932102b57
2 changed files with 2 additions and 2 deletions
|
@ -49,7 +49,7 @@ NEWSBLUR.Models.Story = Backbone.Model.extend({
|
||||||
var content = this.get(attribute);
|
var content = this.get(attribute);
|
||||||
if (!attribute || !content) content = this.story_content();
|
if (!attribute || !content) content = this.story_content();
|
||||||
// First do a naive strip, which is faster than rendering which makes network calls
|
// 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 && Inflector.stripTags(content);
|
||||||
content = content && content.replaceAll(' ', ' '); // Invisible space, boo
|
content = content && content.replaceAll(' ', ' '); // Invisible space, boo
|
||||||
|
|
||||||
|
|
|
@ -206,7 +206,7 @@ NEWSBLUR.Views.StoryTitleView = Backbone.View.extend({
|
||||||
show_content_preview: function() {
|
show_content_preview: function() {
|
||||||
var preference = NEWSBLUR.assets.preference('show_content_preview');
|
var preference = NEWSBLUR.assets.preference('show_content_preview');
|
||||||
if (!preference) return preference;
|
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' ||
|
if (this.options.override_layout == 'grid' ||
|
||||||
NEWSBLUR.assets.view_setting(NEWSBLUR.reader.active_feed, 'layout') == 'grid') {
|
NEWSBLUR.assets.view_setting(NEWSBLUR.reader.active_feed, 'layout') == 'grid') {
|
||||||
|
|
Loading…
Add table
Reference in a new issue