Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions src/options.html
Original file line number Diff line number Diff line change
Expand Up @@ -395,6 +395,11 @@ <h1>Smart RSS</h1>
</select>
</label>

<label class="web-content-select-label">
<span class="selectLabel">Enable YouTube Preview:</span>
<input id="enableYoutubePreview" type="checkbox"/>
</label>

<!-- <label class="web-content-select-label" title="If selected to see all articles hold alt or click on the counter">-->
<!-- <span class="selectLabel">Show only unread articles by default:</span>-->
<!-- <select id="defaultToUnreadOnly">-->
Expand Down
8 changes: 8 additions & 0 deletions src/scripts/app/views/contentView.js
Original file line number Diff line number Diff line change
Expand Up @@ -260,6 +260,14 @@ define(function (require) {
audio.querySelector('source').src = enclosureData.url;
break;
case 'youtube':
// Do not create YouTube Preview if disabled
if (!bg.settings.get('enableYoutubePreview')) {
newEnclosure = document
.createRange()
.createContextualFragment(require('text!templates/enclosureGeneral.html'));
break;
}

newEnclosure = document
.createRange()
.createContextualFragment(require('text!templates/enclosureYoutubeCover.html'));
Expand Down
3 changes: 2 additions & 1 deletion src/scripts/bgprocess/models/Settings.js
Original file line number Diff line number Diff line change
Expand Up @@ -200,7 +200,8 @@ define(['backbone', 'preps/indexeddb'], function (BB) {
invertColors: 'no',
defaultView: 'feed',
cacheParsedArticles: 'false',
defaultToUnreadOnly: 'false'
defaultToUnreadOnly: 'false',
enableYoutubePreview: true,
},
/**
* @property localStorage
Expand Down