New options for WebSocket post processing.

This commit is contained in:
Alexey Skobkin 2015-01-15 15:19:12 +04:00
parent 6d6a9fa3d6
commit 2a5e9da2d8
4 changed files with 22 additions and 21 deletions

View File

@ -140,14 +140,14 @@
"option_ws_comments_notifications": { "option_ws_comments_notifications": {
"message": "Show desktop notifications" "message": "Show desktop notifications"
}, },
"option_ws_feeds": { "option_ws_posts": {
"message": "Process feeds ▼" "message": "Process posts ▼"
}, },
"option_ws_feeds_subscriptions": { "option_ws_posts_add": {
"message": "Subscriptions feed" "message": "Add posts to the feed"
}, },
"option_ws_feeds_blogs": { "option_ws_posts_notifications": {
"message": "User blog pages (only when subscribed)" "message": "Show desktop notifications"
}, },
"option_enlarge_font": { "option_enlarge_font": {
"message": "Enlarge font size ▼" "message": "Enlarge font size ▼"

View File

@ -138,16 +138,16 @@
"message": "Затухание подсветки через 20 секунд" "message": "Затухание подсветки через 20 секунд"
}, },
"option_ws_comments_notifications": { "option_ws_comments_notifications": {
"message": "Включить уведомления на рабочем столе" "message": "Показывать всплывающие уведомления"
}, },
"option_ws_feeds": { "option_ws_posts": {
"message": "Обрабатывать ленты ▼" "message": "Обрабатывать посты ▼"
}, },
"option_ws_feeds_subscriptions": { "option_ws_posts_add": {
"message": "Подписки" "message": "Автоматически добавлять в ленту"
}, },
"option_ws_feeds_blogs": { "option_ws_posts_notifications": {
"message": "Блоги пользователей (только при подписке)" "message": "Показывать всплывающие уведомления"
}, },
"option_enlarge_font": { "option_enlarge_font": {
"message": "Увеличить шрифт ▼" "message": "Увеличить шрифт ▼"

View File

@ -487,7 +487,7 @@ $(document).ready(function() {
console.debug(wsMessage); console.debug(wsMessage);
if (true /*options.is('option_ws_posts_notifications')*/) { if (options.is('option_ws_posts_notifications')) {
console.log('Showing desktop notification'); console.log('Showing desktop notification');
chrome.runtime.sendMessage({ chrome.runtime.sendMessage({
type: 'showNotification', type: 'showNotification',
@ -559,7 +559,6 @@ $(document).ready(function() {
var $post = $(this).parents('.post:first'); var $post = $(this).parents('.post:first');
var csRf = $(this).siblings('input[name="csrf_token"]').val(); var csRf = $(this).siblings('input[name="csrf_token"]').val();
console.log(csRf);
$.ajax({ $.ajax({
type: 'POST', type: 'POST',
@ -752,6 +751,8 @@ function create_comment_elements(commentData, onCommentCreated) {
$commentTemplate.children('.pp-highlight').delay(250).fadeOut(20000); $commentTemplate.children('.pp-highlight').delay(250).fadeOut(20000);
} }
// @todo add indentation indicator support
// Hiding // Hiding
$commentTemplate.hide().delay(250).fadeIn(2000); $commentTemplate.hide().delay(250).fadeIn(2000);

View File

@ -269,17 +269,17 @@
</div> </div>
<div class="option-node"> <div class="option-node">
<input type="checkbox" name="option-ws-feeds" id="option-ws-feeds" disabled> <input type="checkbox" name="option-ws-posts" id="option-ws-posts">
<label for="option-ws-feeds" data-i18n="option_ws_feeds"></label> <label for="option-ws-posts" data-i18n="option_ws_posts"></label>
<label class="option-node"> <label class="option-node">
<input type="checkbox" name="option-ws-feeds-subscriptions"> <input type="checkbox" name="option-ws-posts-add" disabled>
<span data-i18n="option_ws_feeds_subscriptions"></span> <span data-i18n="option_ws_posts_add"></span>
</label> </label>
<label class="option-node"> <label class="option-node">
<input type="checkbox" name="option-ws-feeds-blogs"> <input type="checkbox" name="option-ws-posts-notifications">
<span data-i18n="option_ws_feeds_blogs"></span> <span data-i18n="option_ws_posts_notifications"></span>
</label> </label>
</div> </div>
</div> </div>