Sidebar "go to unread comment" button bugfix. "Remove the fucking button" option added.

This commit is contained in:
Alexey Skobkin 2016-05-10 00:31:50 +03:00
parent ffef920411
commit e67eb36443
4 changed files with 18 additions and 2 deletions

View file

@ -183,6 +183,9 @@
"option_other_move_all_to_menu":{
"message": "Move \"All posts\" to left menu"
},
"option_other_remove_fucking_button":{
"message": "Remove the fucking button"
},
"option_other_post_draft_save":{
"message": "Save post drafts"
},

View file

@ -183,6 +183,9 @@
"option_other_move_all_to_menu":{
"message": "Переместить \"Всё подряд\" в левое меню"
},
"option_other_remove_fucking_button":{
"message": "Убрать ёбаную кнопку"
},
"option_other_post_draft_save":{
"message": "Сохранение черновика поста"
},

View file

@ -68,7 +68,7 @@ function PointPlus(ppVersion) {
$go_to_unread_block = $('<div>').attr({
id: 'pp-go-to-unread',
}).click(function() {
var $unread_comment = $('.unread').first();
var $unread_comment = $('#comments .post.unread').first();
if ($unread_comment.length > 0) {
$('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
if (options.is('option_embedding')) {
// 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>
*/
function update_right_panel_unread_count($span) {
var unread_count = $('.post.unread').length;
var unread_count = $('#comments .post.unread').length;
if (typeof $span === 'undefined') {
$span = $('#pp-unread-count');

View file

@ -242,6 +242,11 @@
<span data-i18n="option_other_move_all_to_menu"></span>
</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">
<input type="checkbox" name="option-other-post-draft-save">
<span data-i18n="option_other_post_draft_save"></span>