mirror of
https://github.com/viq/NewsBlur.git
synced 2025-09-18 21:43:31 +00:00
Adding pref for turning off animations. Still needs some love.
This commit is contained in:
parent
83dc71175e
commit
a038d7d23e
12 changed files with 60 additions and 6328 deletions
|
@ -5234,7 +5234,11 @@ background: transparent;
|
|||
}
|
||||
.NB-modal-preferences .NB-preference-singlestory label img {
|
||||
vertical-align: middle;
|
||||
margin: -1px 6px 0 2px;
|
||||
margin: -5px 6px 0 2px;
|
||||
}
|
||||
.NB-modal-preferences .NB-preference-animations label img {
|
||||
vertical-align: middle;
|
||||
margin: -5px 6px 0 2px;
|
||||
}
|
||||
.NB-modal-preferences .NB-preference-feedorder label img {
|
||||
vertical-align: middle;
|
||||
|
|
|
@ -1,16 +0,0 @@
|
|||
-----BEGIN CERTIFICATE REQUEST-----
|
||||
MIICnDCCAYQCAQAwVzEkMCIGCSqGSIb3DQEJARYVc2FtdWVsQG9mYnJvb2tseW4u
|
||||
Y29tMSIwIAYDVQQDDBlOZXdzQmx1ciBTYWZhcmkgRXh0ZW5zaW9uMQswCQYDVQQG
|
||||
EwJVUzCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEBAM9n19aSqEm/ohMF
|
||||
GqVcSS0ytHwN3EkEtDDOsfdhUQ8a2EwbxDnBgBAjL/EAapohJG6Bk/sr3WVXiDnz
|
||||
rUtngLrUOK9Grsi2hrfm6eWt96WAOM0CRPqLYoDf8dacrzNoWEuX6JbYxZe1x8hz
|
||||
ryHCW5RETsKLxZ26uVxtX8AijNxtTCn6l0TatSvZxHBJKeKTkblrPg63BeOCKO5+
|
||||
qhVFeZ5pyd0J4xfSajV9gWAdxD1g2KeUzXxwIXVyRqmDeQRfXAFYPv/K7hRZvicf
|
||||
/bxIre9loziGJXxKMV+EsoXvXH/JKJ5JMPhRqYH4fqeaE9eNu+EWqnkE94JKi9Ay
|
||||
PhFZjLUCAwEAAaAAMA0GCSqGSIb3DQEBBQUAA4IBAQC5aK+4YIuvrI5Q7kSSDvGN
|
||||
N1arPVNRRBYqXt7c6mAvpycJR00k+r73PaSish5kGstJ0dqI/Wzm8LV+PQHBuN4C
|
||||
YWE4hk7My51baSnBWAgyn7abO+tPkyH3N1g3luDLxvOT0CHzLjX0mUebzNKJdZmF
|
||||
g6s/OJ78775XYbg7c+t6QpGiPlmlyhiUjnDQ+aIfqhfBikf4I2dPzm5iluogeK58
|
||||
hs8t9fHNnSy8JpZZcE+VKoZbQKpUDWJWjSDm7zjDqtcz9E87GsCEDYbVrKLlvFUV
|
||||
PMdBdIx3vV1wHXdH9o17cRUkJAKuCZpuyhVhiOvywuMIkb79kTGP+8yUt4i6mDXe
|
||||
-----END CERTIFICATE REQUEST-----
|
|
@ -1,45 +0,0 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
|
||||
<plist version="1.0">
|
||||
<dict>
|
||||
<key>Author</key>
|
||||
<string>Samuel Clay</string>
|
||||
<key>CFBundleDisplayName</key>
|
||||
<string>NewsBlur Safari Extension</string>
|
||||
<key>CFBundleIdentifier</key>
|
||||
<string>com.newsblur.safariextension</string>
|
||||
<key>CFBundleInfoDictionaryVersion</key>
|
||||
<string>6.0</string>
|
||||
<key>CFBundleShortVersionString</key>
|
||||
<string>1.0</string>
|
||||
<key>CFBundleVersion</key>
|
||||
<string>1</string>
|
||||
<key>Chrome</key>
|
||||
<dict/>
|
||||
<key>Content</key>
|
||||
<dict>
|
||||
<key>Scripts</key>
|
||||
<dict>
|
||||
<key>Start</key>
|
||||
<array>
|
||||
<string>jquery-1.4.2.js</string>
|
||||
<string>safari.js</string>
|
||||
</array>
|
||||
</dict>
|
||||
</dict>
|
||||
<key>Description</key>
|
||||
<string>Better navigation for NewsBlur.</string>
|
||||
<key>ExtensionInfoDictionaryVersion</key>
|
||||
<string>1.0</string>
|
||||
<key>Permissions</key>
|
||||
<dict>
|
||||
<key>Website Access</key>
|
||||
<dict>
|
||||
<key>Level</key>
|
||||
<string>All</string>
|
||||
</dict>
|
||||
</dict>
|
||||
<key>Website</key>
|
||||
<string>http://www.newsblur.com</string>
|
||||
</dict>
|
||||
</plist>
|
|
@ -1,5 +0,0 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
|
||||
<plist version="1.0">
|
||||
<array/>
|
||||
</plist>
|
File diff suppressed because it is too large
Load diff
|
@ -1,4 +0,0 @@
|
|||
<!DOCTYPE html>
|
||||
<script>
|
||||
|
||||
</script>
|
|
@ -1,6 +0,0 @@
|
|||
setInterval(function() {
|
||||
var $iframe = $('#story_iframe');
|
||||
if ($iframe.length) {
|
||||
console.log(['iframe', $iframe.contents().find('div').length]);
|
||||
}
|
||||
}, 3000);
|
Binary file not shown.
|
@ -1979,6 +1979,8 @@
|
|||
return;
|
||||
}
|
||||
|
||||
if (!this.model.preference('animations')) skip_scroll = true;
|
||||
|
||||
// NEWSBLUR.log(['scroll_to_story_in_story_feed', story, $story]);
|
||||
|
||||
if ($story && $story.length) {
|
||||
|
@ -1987,8 +1989,8 @@
|
|||
this.model.preference('feed_view_single_story')) ||
|
||||
(this.story_view == 'page' &&
|
||||
!this.flags['page_view_showing_feed_view'])) {
|
||||
this.flags.scrolling_by_selecting_story_title = false;
|
||||
$feed_stories.scrollTo($story, 0, { axis: 'y', offset: 0 }); // Do this at view switch instead.
|
||||
|
||||
} else if (this.story_view == 'feed' || this.flags['page_view_showing_feed_view']) {
|
||||
$feed_stories.scrollable().stop();
|
||||
$feed_stories.scrollTo($story, 340, { axis: 'y', easing: 'easeInOutQuint', offset: 0, queue: false, onAfter: function() {
|
||||
|
@ -2007,12 +2009,15 @@
|
|||
scroll_to_story_in_iframe: function(story, $story, skip_scroll) {
|
||||
var self = this;
|
||||
var $iframe = this.$s.$feed_iframe;
|
||||
|
||||
if (!this.model.preference('animations')) skip_scroll = true;
|
||||
|
||||
if ($story && $story.length) {
|
||||
if (skip_scroll
|
||||
|| this.story_view == 'feed'
|
||||
|| this.story_view == 'story'
|
||||
|| this.flags['page_view_showing_feed_view']) {
|
||||
this.flags.scrolling_by_selecting_story_title = false;
|
||||
$iframe.scrollTo($story, 0, { axis: 'y', offset: -24 }); // Do this at story_view switch
|
||||
} else if (this.story_view == 'page') {
|
||||
$iframe.scrollable().stop();
|
||||
|
@ -3559,7 +3564,7 @@
|
|||
'left': 0
|
||||
}, {
|
||||
'easing': 'easeInOutQuint',
|
||||
'duration': 550,
|
||||
'duration': this.model.preference('animations') ? 550 : 0,
|
||||
'queue': false
|
||||
});
|
||||
} else if (view == 'feed') {
|
||||
|
@ -3572,7 +3577,7 @@
|
|||
'left': -1 * $feed_iframe.width()
|
||||
}, {
|
||||
'easing': 'easeInOutQuint',
|
||||
'duration': 550,
|
||||
'duration': this.model.preference('animations') ? 550 : 0,
|
||||
'queue': false
|
||||
});
|
||||
|
||||
|
@ -3590,7 +3595,7 @@
|
|||
'left': -2 * $feed_iframe.width()
|
||||
}, {
|
||||
'easing': 'easeInOutQuint',
|
||||
'duration': 550,
|
||||
'duration': this.model.preference('animations') ? 550 : 0,
|
||||
'queue': false
|
||||
});
|
||||
this.load_story_iframe();
|
||||
|
@ -4525,8 +4530,13 @@
|
|||
|
||||
// NEWSBLUR.log(['Showing correct stories', this.story_view, this.flags['feed_view_positions_calculated'], unread_view_name, $stories_show.length, $stories_hide.length]);
|
||||
if (options['animate'] && options['follow']) {
|
||||
$stories_hide.slideUp(500);
|
||||
$stories_show.slideDown(500);
|
||||
if (this.model.preference('animations')) {
|
||||
$stories_hide.slideUp(500);
|
||||
$stories_show.slideDown(500);
|
||||
} else {
|
||||
$stories_hide.css({'display': 'none'});
|
||||
$stories_show.css({'display': 'block'});
|
||||
}
|
||||
setTimeout(function() {
|
||||
if (!self.active_story) return;
|
||||
var $story = self.find_story_in_story_titles(self.active_story.id);
|
||||
|
@ -4537,7 +4547,7 @@
|
|||
self.open_story(story, $story);
|
||||
self.scroll_story_titles_to_show_selected_story_title($story);
|
||||
}
|
||||
}, 550);
|
||||
}, this.model.preference('animations') ? 550 : 0);
|
||||
}
|
||||
},
|
||||
|
||||
|
|
|
@ -265,6 +265,27 @@ NEWSBLUR.ReaderPreferences.prototype = {
|
|||
'Feed view'
|
||||
])
|
||||
]),
|
||||
$.make('div', { className: 'NB-preference NB-preference-animations' }, [
|
||||
$.make('div', { className: 'NB-preference-options' }, [
|
||||
$.make('div', [
|
||||
$.make('input', { id: 'NB-preference-animations-1', type: 'radio', name: 'animations', value: 'true' }),
|
||||
$.make('label', { 'for': 'NB-preference-animations-1' }, [
|
||||
$.make('img', { src: NEWSBLUR.Globals.MEDIA_URL+'/img/icons/silk/arrow_in.png' }),
|
||||
'Show all animations'
|
||||
])
|
||||
]),
|
||||
$.make('div', [
|
||||
$.make('input', { id: 'NB-preference-animations-2', type: 'radio', name: 'animations', value: 'false' }),
|
||||
$.make('label', { 'for': 'NB-preference-animations-2' }, [
|
||||
$.make('img', { src: NEWSBLUR.Globals.MEDIA_URL+'/img/icons/silk/arrow_right.png' }),
|
||||
'Jump immediately with no animations'
|
||||
])
|
||||
])
|
||||
]),
|
||||
$.make('div', { className: 'NB-preference-label'}, [
|
||||
'Animations'
|
||||
])
|
||||
]),
|
||||
$.make('div', { className: 'NB-preference NB-preference-story-styling' }, [
|
||||
$.make('div', { className: 'NB-preference-options' }, [
|
||||
$.make('div', [
|
||||
|
@ -446,6 +467,12 @@ NEWSBLUR.ReaderPreferences.prototype = {
|
|||
return false;
|
||||
}
|
||||
});
|
||||
$('input[name=animations]', this.$modal).each(function() {
|
||||
if ($(this).val() == ""+NEWSBLUR.Preferences.animations) {
|
||||
$(this).attr('checked', true);
|
||||
return false;
|
||||
}
|
||||
});
|
||||
$('input[name=show_tooltips]', this.$modal).each(function() {
|
||||
if ($(this).val() == NEWSBLUR.Preferences.show_tooltips) {
|
||||
$(this).attr('checked', true);
|
||||
|
@ -481,7 +508,10 @@ NEWSBLUR.ReaderPreferences.prototype = {
|
|||
var preferences = {};
|
||||
|
||||
$('input[type=radio]:checked, select, input[type=password]', this.$modal).each(function() {
|
||||
preferences[$(this).attr('name')] = $(this).val();
|
||||
var name = $(this).attr('name');
|
||||
var preference = preferences[name] = $(this).val();
|
||||
if (preference == 'true') preferences[name] = true;
|
||||
else if (preference == 'false') preferences[name] = false;
|
||||
});
|
||||
$('input[type=checkbox]', this.$modal).each(function() {
|
||||
preferences[$(this).attr('name')] = $(this).is(':checked');
|
||||
|
|
|
@ -32,6 +32,7 @@ _.extend(NEWSBLUR.ReaderTutorial.prototype, {
|
|||
this.page(1);
|
||||
this.load_newsblur_blog_info();
|
||||
this.load_intelligence_slider();
|
||||
this.load_tips();
|
||||
this.make_story_titles();
|
||||
this.rotate_slider();
|
||||
|
||||
|
@ -163,9 +164,7 @@ _.extend(NEWSBLUR.ReaderTutorial.prototype, {
|
|||
$.make('li', { className: 'NB-tutorial-tips-sites' }, [
|
||||
$.make('img', { src: NEWSBLUR.Globals.MEDIA_URL + '/img/reader/tutorial_tips_sites.png' }),
|
||||
$.make('div', [
|
||||
'Click on ',
|
||||
$.make('span', { className: 'NB-tutorial-sites-count' }),
|
||||
' at the top of the sidebar to hide sites with no unread stories.'
|
||||
'Click on the sites count at the top of the sidebar to hide sites with no unread stories.'
|
||||
])
|
||||
]),
|
||||
$.make('li', [
|
||||
|
@ -342,6 +341,10 @@ _.extend(NEWSBLUR.ReaderTutorial.prototype, {
|
|||
$('.NB-modal-title', this.$modal).text(this.TITLES[this.page_number-1]);
|
||||
},
|
||||
|
||||
load_tips: function() {
|
||||
|
||||
},
|
||||
|
||||
make_story_titles: function() {
|
||||
var $story_titles = $('.NB-tutorial-stories', this.$modal);
|
||||
|
||||
|
|
|
@ -34,6 +34,7 @@
|
|||
'feed_order' : 'ALPHABETICAL',
|
||||
'hide_story_changes' : 1,
|
||||
'feed_view_single_story' : 0,
|
||||
'animations' : true,
|
||||
'view_settings' : {},
|
||||
'collapsed_folders' : [],
|
||||
'story_styling' : 'sans-serif',
|
||||
|
|
Loading…
Add table
Reference in a new issue