mirror of
https://bitbucket.org/skobkin/chrome_point_plus.git
synced 2024-11-23 10:46:02 +00:00
Sidebar "go to unread comment" button bugfix. "Remove the fucking button" option added.
This commit is contained in:
parent
ffef920411
commit
e67eb36443
|
@ -183,6 +183,9 @@
|
||||||
"option_other_move_all_to_menu":{
|
"option_other_move_all_to_menu":{
|
||||||
"message": "Move \"All posts\" to left menu"
|
"message": "Move \"All posts\" to left menu"
|
||||||
},
|
},
|
||||||
|
"option_other_remove_fucking_button":{
|
||||||
|
"message": "Remove the fucking button"
|
||||||
|
},
|
||||||
"option_other_post_draft_save":{
|
"option_other_post_draft_save":{
|
||||||
"message": "Save post drafts"
|
"message": "Save post drafts"
|
||||||
},
|
},
|
||||||
|
|
|
@ -183,6 +183,9 @@
|
||||||
"option_other_move_all_to_menu":{
|
"option_other_move_all_to_menu":{
|
||||||
"message": "Переместить \"Всё подряд\" в левое меню"
|
"message": "Переместить \"Всё подряд\" в левое меню"
|
||||||
},
|
},
|
||||||
|
"option_other_remove_fucking_button":{
|
||||||
|
"message": "Убрать ёбаную кнопку"
|
||||||
|
},
|
||||||
"option_other_post_draft_save":{
|
"option_other_post_draft_save":{
|
||||||
"message": "Сохранение черновика поста"
|
"message": "Сохранение черновика поста"
|
||||||
},
|
},
|
||||||
|
|
|
@ -68,7 +68,7 @@ function PointPlus(ppVersion) {
|
||||||
$go_to_unread_block = $('<div>').attr({
|
$go_to_unread_block = $('<div>').attr({
|
||||||
id: 'pp-go-to-unread',
|
id: 'pp-go-to-unread',
|
||||||
}).click(function() {
|
}).click(function() {
|
||||||
var $unread_comment = $('.unread').first();
|
var $unread_comment = $('#comments .post.unread').first();
|
||||||
|
|
||||||
if ($unread_comment.length > 0) {
|
if ($unread_comment.length > 0) {
|
||||||
$('html body').animate({ scrollTop: $unread_comment.offset().top }, 500);
|
$('html body').animate({ scrollTop: $unread_comment.offset().top }, 500);
|
||||||
|
@ -91,6 +91,11 @@ function PointPlus(ppVersion) {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Remove fucking button
|
||||||
|
if (options.is('option_other_remove_fucking_button')) {
|
||||||
|
$('#scrollToTop').remove();
|
||||||
|
}
|
||||||
|
|
||||||
// Embedding
|
// Embedding
|
||||||
if (options.is('option_embedding')) {
|
if (options.is('option_embedding')) {
|
||||||
// Load pictures from Booru, Tumblr and some other sites
|
// Load pictures from Booru, Tumblr and some other sites
|
||||||
|
@ -726,7 +731,7 @@ function create_comment_elements(commentData, onCommentCreated) {
|
||||||
* @param {?object} $span jQuery object of unread count <span>
|
* @param {?object} $span jQuery object of unread count <span>
|
||||||
*/
|
*/
|
||||||
function update_right_panel_unread_count($span) {
|
function update_right_panel_unread_count($span) {
|
||||||
var unread_count = $('.post.unread').length;
|
var unread_count = $('#comments .post.unread').length;
|
||||||
|
|
||||||
if (typeof $span === 'undefined') {
|
if (typeof $span === 'undefined') {
|
||||||
$span = $('#pp-unread-count');
|
$span = $('#pp-unread-count');
|
||||||
|
|
|
@ -242,6 +242,11 @@
|
||||||
<span data-i18n="option_other_move_all_to_menu"></span>
|
<span data-i18n="option_other_move_all_to_menu"></span>
|
||||||
</label>
|
</label>
|
||||||
|
|
||||||
|
<label class="option-node">
|
||||||
|
<input type="checkbox" name="option-other-remove-fucking-button">
|
||||||
|
<span data-i18n="option_other_remove_fucking_button"></span>
|
||||||
|
</label>
|
||||||
|
|
||||||
<label class="option-node">
|
<label class="option-node">
|
||||||
<input type="checkbox" name="option-other-post-draft-save">
|
<input type="checkbox" name="option-other-post-draft-save">
|
||||||
<span data-i18n="option_other_post_draft_save"></span>
|
<span data-i18n="option_other_post_draft_save"></span>
|
||||||
|
|
Loading…
Reference in a new issue