mirror of
https://github.com/viq/NewsBlur.git
synced 2025-09-18 21:43:31 +00:00
Adding preference to turn off highlighter.
This commit is contained in:
parent
a6a6d51983
commit
009a59006e
3 changed files with 26 additions and 1 deletions
|
@ -28,6 +28,7 @@ _.extend(NEWSBLUR.ReaderPreferences.prototype, {
|
|||
this.original_preferences = this.serialize_preferences();
|
||||
|
||||
this.$modal.bind('click', $.rescope(this.handle_click, this));
|
||||
this.$modal.bind('click', $.rescope(this.handle_click, this));
|
||||
},
|
||||
|
||||
make_modal: function() {
|
||||
|
@ -795,6 +796,21 @@ _.extend(NEWSBLUR.ReaderPreferences.prototype, {
|
|||
$.make('div', { className: 'NB-preference-label'}, [
|
||||
'Story button placement'
|
||||
])
|
||||
]),
|
||||
$.make('div', { className: 'NB-preference NB-preference-highlights' }, [
|
||||
$.make('div', { className: 'NB-preference-options' }, [
|
||||
$.make('div', [
|
||||
$.make('input', { id: 'NB-preference-highlights-1', type: 'radio', name: 'highlights', value: 'true' }),
|
||||
$.make('label', { 'for': 'NB-preference-highlights-1' }, 'Show highlighter when selecting text')
|
||||
]),
|
||||
$.make('div', [
|
||||
$.make('input', { id: 'NB-preference-highlights-2', type: 'radio', name: 'highlights', value: 'false' }),
|
||||
$.make('label', { 'for': 'NB-preference-highlights-2' }, 'Disable the highlighter')
|
||||
])
|
||||
]),
|
||||
$.make('div', { className: 'NB-preference-label'}, [
|
||||
'Enable highlighting'
|
||||
])
|
||||
])
|
||||
]),
|
||||
$.make('div', { className: 'NB-tab NB-tab-keyboard' }, [
|
||||
|
@ -1130,6 +1146,12 @@ _.extend(NEWSBLUR.ReaderPreferences.prototype, {
|
|||
return false;
|
||||
}
|
||||
});
|
||||
$('input[name=highlights]', $modal).each(function() {
|
||||
if ($(this).val() == ""+NEWSBLUR.Preferences.highlights) {
|
||||
$(this).attr('checked', true);
|
||||
return false;
|
||||
}
|
||||
});
|
||||
$('input[name=keyboard_verticalarrows]', $modal).each(function() {
|
||||
if ($(this).val() == NEWSBLUR.Preferences.keyboard_verticalarrows) {
|
||||
$(this).attr('checked', true);
|
||||
|
|
|
@ -725,6 +725,8 @@ NEWSBLUR.Views.StoryDetailView = Backbone.View.extend({
|
|||
return;
|
||||
}
|
||||
|
||||
if (!NEWSBLUR.assets.preference('highlights')) return;
|
||||
|
||||
this.$(".NB-starred-story-selection-highlight,[data-tippy]").contents().unwrap();
|
||||
$doc.attr('id', 'NB-highlighting');
|
||||
|
||||
|
|
|
@ -93,7 +93,8 @@
|
|||
'story_share_readitlater' : false,
|
||||
'story_share_instapaper' : true,
|
||||
'story_share_email' : true,
|
||||
'theme' : 'auto'
|
||||
'theme' : 'auto',
|
||||
'highlights' : true
|
||||
};
|
||||
NEWSBLUR.URLs = {
|
||||
'upload-avatar' : "{% url "upload-avatar" %}",
|
||||
|
|
Loading…
Add table
Reference in a new issue