mirror of
https://github.com/viq/NewsBlur.git
synced 2025-09-18 21:43:31 +00:00
Adding Pinterest.
This commit is contained in:
parent
7da98999b6
commit
7d64dc5ce1
4 changed files with 36 additions and 0 deletions
|
@ -6092,6 +6092,11 @@ form.opml_import_form input {
|
||||||
}
|
}
|
||||||
.NB-menu-manage .NB-menu-manage-story-thirdparty .NB-menu-manage-thirdparty-pinboard {
|
.NB-menu-manage .NB-menu-manage-story-thirdparty .NB-menu-manage-thirdparty-pinboard {
|
||||||
background: transparent url('/media/embed/reader/pinboard.png') no-repeat 0 0;
|
background: transparent url('/media/embed/reader/pinboard.png') no-repeat 0 0;
|
||||||
|
background-size: 16px;
|
||||||
|
}
|
||||||
|
.NB-menu-manage .NB-menu-manage-story-thirdparty .NB-menu-manage-thirdparty-pinterest {
|
||||||
|
background: transparent url('/media/embed/reader/pinterest.png') no-repeat 0 0;
|
||||||
|
background-size: 16px;
|
||||||
}
|
}
|
||||||
.NB-menu-manage .NB-menu-manage-story-thirdparty .NB-menu-manage-thirdparty-buffer {
|
.NB-menu-manage .NB-menu-manage-story-thirdparty .NB-menu-manage-thirdparty-buffer {
|
||||||
background: transparent url('/media/embed/reader/buffer.png') no-repeat 0 0;
|
background: transparent url('/media/embed/reader/buffer.png') no-repeat 0 0;
|
||||||
|
@ -6136,6 +6141,7 @@ form.opml_import_form input {
|
||||||
.NB-menu-manage .NB-menu-manage-story-thirdparty.NB-menu-manage-highlight-tumblr .NB-menu-manage-thirdparty-email,
|
.NB-menu-manage .NB-menu-manage-story-thirdparty.NB-menu-manage-highlight-tumblr .NB-menu-manage-thirdparty-email,
|
||||||
.NB-menu-manage .NB-menu-manage-story-thirdparty.NB-menu-manage-highlight-delicious .NB-menu-manage-thirdparty-email,
|
.NB-menu-manage .NB-menu-manage-story-thirdparty.NB-menu-manage-highlight-delicious .NB-menu-manage-thirdparty-email,
|
||||||
.NB-menu-manage .NB-menu-manage-story-thirdparty.NB-menu-manage-highlight-pinboard .NB-menu-manage-thirdparty-email,
|
.NB-menu-manage .NB-menu-manage-story-thirdparty.NB-menu-manage-highlight-pinboard .NB-menu-manage-thirdparty-email,
|
||||||
|
.NB-menu-manage .NB-menu-manage-story-thirdparty.NB-menu-manage-highlight-pinterest .NB-menu-manage-thirdparty-email,
|
||||||
.NB-menu-manage .NB-menu-manage-story-thirdparty.NB-menu-manage-highlight-buffer .NB-menu-manage-thirdparty-email,
|
.NB-menu-manage .NB-menu-manage-story-thirdparty.NB-menu-manage-highlight-buffer .NB-menu-manage-thirdparty-email,
|
||||||
.NB-menu-manage .NB-menu-manage-story-thirdparty.NB-menu-manage-highlight-diigo .NB-menu-manage-thirdparty-email,
|
.NB-menu-manage .NB-menu-manage-story-thirdparty.NB-menu-manage-highlight-diigo .NB-menu-manage-thirdparty-email,
|
||||||
.NB-menu-manage .NB-menu-manage-story-thirdparty.NB-menu-manage-highlight-kippt .NB-menu-manage-thirdparty-email,
|
.NB-menu-manage .NB-menu-manage-story-thirdparty.NB-menu-manage-highlight-kippt .NB-menu-manage-thirdparty-email,
|
||||||
|
@ -6163,6 +6169,9 @@ form.opml_import_form input {
|
||||||
.NB-menu-manage .NB-menu-manage-story-thirdparty.NB-menu-manage-highlight-pinboard .NB-menu-manage-thirdparty-pinboard {
|
.NB-menu-manage .NB-menu-manage-story-thirdparty.NB-menu-manage-highlight-pinboard .NB-menu-manage-thirdparty-pinboard {
|
||||||
opacity: 1;
|
opacity: 1;
|
||||||
}
|
}
|
||||||
|
.NB-menu-manage .NB-menu-manage-story-thirdparty.NB-menu-manage-highlight-pinterest .NB-menu-manage-thirdparty-pinterest {
|
||||||
|
opacity: 1;
|
||||||
|
}
|
||||||
.NB-menu-manage .NB-menu-manage-story-thirdparty.NB-menu-manage-highlight-buffer .NB-menu-manage-thirdparty-buffer {
|
.NB-menu-manage .NB-menu-manage-story-thirdparty.NB-menu-manage-highlight-buffer .NB-menu-manage-thirdparty-buffer {
|
||||||
opacity: 1;
|
opacity: 1;
|
||||||
}
|
}
|
||||||
|
@ -8328,6 +8337,10 @@ form.opml_import_form input {
|
||||||
.NB-modal-preferences .NB-preference-story-share label[for=NB-preference-story-share-pinboard] {
|
.NB-modal-preferences .NB-preference-story-share label[for=NB-preference-story-share-pinboard] {
|
||||||
background: transparent url('/media/embed/reader/pinboard.png') no-repeat 0 0;
|
background: transparent url('/media/embed/reader/pinboard.png') no-repeat 0 0;
|
||||||
}
|
}
|
||||||
|
.NB-modal-preferences .NB-preference-story-share label[for=NB-preference-story-share-pinterest] {
|
||||||
|
background: transparent url('/media/embed/reader/pinterest.png') no-repeat 0 0;
|
||||||
|
background-size: 16px;
|
||||||
|
}
|
||||||
.NB-modal-preferences .NB-preference-story-share label[for=NB-preference-story-share-buffer] {
|
.NB-modal-preferences .NB-preference-story-share label[for=NB-preference-story-share-buffer] {
|
||||||
background: transparent url('/media/embed/reader/buffer.png') no-repeat 0 0;
|
background: transparent url('/media/embed/reader/buffer.png') no-repeat 0 0;
|
||||||
background-size: 16px;
|
background-size: 16px;
|
||||||
|
|
BIN
media/img/reader/pinterest.png
Normal file
BIN
media/img/reader/pinterest.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 1.9 KiB |
|
@ -2097,6 +2097,18 @@
|
||||||
NEWSBLUR.assets.stories.mark_read(story, {skip_delay: true});
|
NEWSBLUR.assets.stories.mark_read(story, {skip_delay: true});
|
||||||
},
|
},
|
||||||
|
|
||||||
|
send_story_to_pinterest: function(story_id) {
|
||||||
|
var story = this.model.get_story(story_id);
|
||||||
|
var url = 'http://www.pinterest.com/pin/find/?';
|
||||||
|
var pinterest_url = [
|
||||||
|
url,
|
||||||
|
'url=',
|
||||||
|
encodeURIComponent(story.get('story_permalink'))
|
||||||
|
].join('');
|
||||||
|
window.open(pinterest_url, '_blank');
|
||||||
|
NEWSBLUR.assets.stories.mark_read(story, {skip_delay: true});
|
||||||
|
},
|
||||||
|
|
||||||
send_story_to_buffer: function(story_id) {
|
send_story_to_buffer: function(story_id) {
|
||||||
var story = this.model.get_story(story_id);
|
var story = this.model.get_story(story_id);
|
||||||
var url = 'https://bufferapp.com/add?source=newsblur&';
|
var url = 'https://bufferapp.com/add?source=newsblur&';
|
||||||
|
@ -3023,6 +3035,11 @@
|
||||||
}, this)).bind('mouseleave', _.bind(function(e) {
|
}, this)).bind('mouseleave', _.bind(function(e) {
|
||||||
$(e.target).siblings('.NB-menu-manage-title').text('Email story').parent().removeClass('NB-menu-manage-highlight-pinboard');
|
$(e.target).siblings('.NB-menu-manage-title').text('Email story').parent().removeClass('NB-menu-manage-highlight-pinboard');
|
||||||
}, this))),
|
}, this))),
|
||||||
|
(NEWSBLUR.Preferences['story_share_pinterest'] && $.make('div', { className: 'NB-menu-manage-thirdparty-icon NB-menu-manage-thirdparty-pinterest'}).bind('mouseenter', _.bind(function(e) {
|
||||||
|
$(e.target).siblings('.NB-menu-manage-title').text('Pinterest').parent().addClass('NB-menu-manage-highlight-pinterest');
|
||||||
|
}, this)).bind('mouseleave', _.bind(function(e) {
|
||||||
|
$(e.target).siblings('.NB-menu-manage-title').text('Email story').parent().removeClass('NB-menu-manage-highlight-pinterest');
|
||||||
|
}, this))),
|
||||||
(NEWSBLUR.Preferences['story_share_buffer'] && $.make('div', { className: 'NB-menu-manage-thirdparty-icon NB-menu-manage-thirdparty-buffer'}).bind('mouseenter', _.bind(function(e) {
|
(NEWSBLUR.Preferences['story_share_buffer'] && $.make('div', { className: 'NB-menu-manage-thirdparty-icon NB-menu-manage-thirdparty-buffer'}).bind('mouseenter', _.bind(function(e) {
|
||||||
$(e.target).siblings('.NB-menu-manage-title').text('Buffer').parent().addClass('NB-menu-manage-highlight-buffer');
|
$(e.target).siblings('.NB-menu-manage-title').text('Buffer').parent().addClass('NB-menu-manage-highlight-buffer');
|
||||||
}, this)).bind('mouseleave', _.bind(function(e) {
|
}, this)).bind('mouseleave', _.bind(function(e) {
|
||||||
|
@ -3079,6 +3096,8 @@
|
||||||
this.send_story_to_readability(story.id);
|
this.send_story_to_readability(story.id);
|
||||||
} else if ($target.hasClass('NB-menu-manage-thirdparty-pinboard')) {
|
} else if ($target.hasClass('NB-menu-manage-thirdparty-pinboard')) {
|
||||||
this.send_story_to_pinboard(story.id);
|
this.send_story_to_pinboard(story.id);
|
||||||
|
} else if ($target.hasClass('NB-menu-manage-thirdparty-pinterest')) {
|
||||||
|
this.send_story_to_pinterest(story.id);
|
||||||
} else if ($target.hasClass('NB-menu-manage-thirdparty-buffer')) {
|
} else if ($target.hasClass('NB-menu-manage-thirdparty-buffer')) {
|
||||||
this.send_story_to_buffer(story.id);
|
this.send_story_to_buffer(story.id);
|
||||||
} else if ($target.hasClass('NB-menu-manage-thirdparty-diigo')) {
|
} else if ($target.hasClass('NB-menu-manage-thirdparty-diigo')) {
|
||||||
|
|
|
@ -492,6 +492,10 @@ _.extend(NEWSBLUR.ReaderPreferences.prototype, {
|
||||||
$.make('input', { type: 'checkbox', id: 'NB-preference-story-share-pinboard', name: 'story_share_pinboard' }),
|
$.make('input', { type: 'checkbox', id: 'NB-preference-story-share-pinboard', name: 'story_share_pinboard' }),
|
||||||
$.make('label', { 'for': 'NB-preference-story-share-pinboard' })
|
$.make('label', { 'for': 'NB-preference-story-share-pinboard' })
|
||||||
]),
|
]),
|
||||||
|
$.make('div', { className: 'NB-preference-option', title: 'Pinterest' }, [
|
||||||
|
$.make('input', { type: 'checkbox', id: 'NB-preference-story-share-pinterest', name: 'story_share_pinterest' }),
|
||||||
|
$.make('label', { 'for': 'NB-preference-story-share-pinterest' })
|
||||||
|
]),
|
||||||
$.make('div', { className: 'NB-preference-option', title: 'Buffer' }, [
|
$.make('div', { className: 'NB-preference-option', title: 'Buffer' }, [
|
||||||
$.make('input', { type: 'checkbox', id: 'NB-preference-story-share-buffer', name: 'story_share_buffer' }),
|
$.make('input', { type: 'checkbox', id: 'NB-preference-story-share-buffer', name: 'story_share_buffer' }),
|
||||||
$.make('label', { 'for': 'NB-preference-story-share-buffer' })
|
$.make('label', { 'for': 'NB-preference-story-share-buffer' })
|
||||||
|
|
Loading…
Add table
Reference in a new issue