From 96dbb19ea4f64fd20d35b760c7a364d1fa8572f8 Mon Sep 17 00:00:00 2001 From: Nokita Kaze Date: Tue, 30 Dec 2014 16:59:26 +0300 Subject: [PATCH] =?UTF-8?q?*=20=D0=A8=D0=B2=D0=B0=D0=B1=D1=80=D0=BE=D1=82?= =?UTF-8?q?=D0=BE=D1=87=D0=BA=D1=83=20=D0=BF=D0=BE=D0=BC=D0=B5=D0=BD=D1=8F?= =?UTF-8?q?=D0=BB=20*=20=D0=A1=D1=82=D0=B8=D0=BB=D1=8C=20function()=20?= =?UTF-8?q?=D0=BF=D0=BE=D0=BF=D1=80=D0=B0=D0=B2=D0=B8=D0=BB=20*=20User=20c?= =?UTF-8?q?omments=20system=20=D0=B2=D1=8B=D0=BD=D0=B5=D1=81=20=D0=B2=20?= =?UTF-8?q?=D0=BE=D0=BF=D1=86=D0=B8=D0=BE=D0=BD=D0=B0=D0=BB=D0=BA=D1=83,?= =?UTF-8?q?=20=D1=85=D0=BE=D1=82=D1=8F=20=D1=81=D1=87=D0=B8=D1=82=D0=B0?= =?UTF-8?q?=D1=8E,=20=D1=87=D1=82=D0=BE=20=D0=BD=D0=B5=D0=BF=D0=BE=D1=80?= =?UTF-8?q?=D0=B0=D0=B6=D0=B0=D1=8E=D1=89=D0=B8=D0=B9=20=D1=84=D1=83=D0=BD?= =?UTF-8?q?=D0=BA=D0=B8=D0=BE=D0=BD=D0=B0=D0=BB=20=D0=BC=D0=BE=D0=B6=D0=BD?= =?UTF-8?q?=D0=BE=20=D0=BD=D0=B5=20=D0=BE=D1=82=D0=BA=D0=BB=D1=8E=D1=87?= =?UTF-8?q?=D0=B0=D1=82=D1=8C=20*=20same=20protocol=20=D1=87=D0=B5=D1=80?= =?UTF-8?q?=D0=B5=D0=B7=20//?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- chrome_point_plus/_locales/en/messages.json | 3 ++ chrome_point_plus/_locales/ru/messages.json | 3 ++ chrome_point_plus/css/point-plus.css | 2 +- .../{habra-point.png => nesting-point.png} | Bin 593 -> 651 bytes chrome_point_plus/js/point-plus.js | 42 +++++++++--------- chrome_point_plus/manifest.json | 2 +- chrome_point_plus/options.html | 4 ++ 7 files changed, 34 insertions(+), 22 deletions(-) rename chrome_point_plus/images/{habra-point.png => nesting-point.png} (52%) diff --git a/chrome_point_plus/_locales/en/messages.json b/chrome_point_plus/_locales/en/messages.json index a091bfc..f896da8 100644 --- a/chrome_point_plus/_locales/en/messages.json +++ b/chrome_point_plus/_locales/en/messages.json @@ -159,6 +159,9 @@ "option_other_comments_nesting_level":{ "message": "Comments Nesting level indicator" }, + "option_other_comments_user_system":{ + "message": "Your hints about users" + }, "option_other_comments_count_refresh":{ "message": "Refresh unread posts and comments count in left menu" }, diff --git a/chrome_point_plus/_locales/ru/messages.json b/chrome_point_plus/_locales/ru/messages.json index ddb1612..edad6f4 100644 --- a/chrome_point_plus/_locales/ru/messages.json +++ b/chrome_point_plus/_locales/ru/messages.json @@ -159,6 +159,9 @@ "option_other_comments_nesting_level":{ "message": "Индикатор уровня вложенности коммнентариев" }, + "option_other_comments_user_system":{ + "message": "Заметки о пользователях на полях" + }, "option_other_comments_count_refresh":{ "message": "Обновляем количество непрочитанных комментариев и постов в ленте" }, diff --git a/chrome_point_plus/css/point-plus.css b/chrome_point_plus/css/point-plus.css index 5c214cf..4491680 100644 --- a/chrome_point_plus/css/point-plus.css +++ b/chrome_point_plus/css/point-plus.css @@ -295,5 +295,5 @@ div#markItUpText-input { #comments .post:hover .nesting { background-repeat: repeat-x; - background-image: url('chrome-extension://__MSG_@@extension_id__/images/habra-point.png'); + background-image: url('chrome-extension://__MSG_@@extension_id__/images/nesting-point.png'); } \ No newline at end of file diff --git a/chrome_point_plus/images/habra-point.png b/chrome_point_plus/images/nesting-point.png similarity index 52% rename from chrome_point_plus/images/habra-point.png rename to chrome_point_plus/images/nesting-point.png index 4de06aad45959555f5bb4c58af589166d6b41a67..d58b65344a4e76e511ddddc9bcadb500659db276 100644 GIT binary patch delta 251 zcmcb}(#<+SoQt1>je&u2)sMUx8x`9a>(6_-IEGZ*O8WW#zdbVua5IZA0KxzNV4)Uv z2)ps*!KY`Hvj5MIx_5>HB6RQyYx)e=Yh8v01~$xKA*YMI3wfL`=xmzS*x2aU-q`r? z)XJx4HME=;d=UjI0Gg?E(T9t5p`TE4LPACBnRteS|u$&>fe=5X*|M5B_t$VfLLN-jbMa>k%55$L=Q8A WgS(z>k9w0oi0|p@=d#Wzp$P!P7hxCx delta 193 zcmeBXy~r{_oJ*L4iGhJJu+Lh5qhcFl{ZvmE$B>F!Nq_$Tw`XQ%76#%bpaO>f|C4?I zg+Tnx6Sm4jL|QZ)CZ!|**&yj7%Q&Y(R61oiU-uEJzqGDcfDJ6SXi}xf$M12~d%oXF z=9u5w2n2$P{9q}ka(TwbZ7aT'); current_user_hint_block.appendChild(buttons_block); - $(buttons_block).find('.edit').on('click', function () { - chrome.storage.sync.get('point_user_hints', function (items) { + $(buttons_block).find('.edit').on('click', function() { + chrome.storage.sync.get('point_user_hints', function(items) { var current_text = ''; if (typeof(items.point_user_hints[current_user_name]) !== 'undefined') { current_text = items.point_user_hints[current_user_name]; @@ -1111,13 +1113,13 @@ function hints_draw_main_user_hint(items) { $(change_hint_block).addClass('change_hint_block').hide(). html('' + 'Отмена'); - $(change_hint_block).find('.button_save').on('click', function () { + $(change_hint_block).find('.button_save').on('click', function() { $('.current-user-hint .change_hint_block').slideUp(500); var new_text = $('.current-user-hint .change_hint_block textarea').val(); $('.current-user-hint > .text').hide().html(hints_raw_text_to_html(new_text)).fadeIn(750); hints_save_new_hint(current_user_name, new_text); }); - $(change_hint_block).find('.button_cancel').on('click', function () { + $(change_hint_block).find('.button_cancel').on('click', function() { $('.current-user-hint .change_hint_block').slideUp(500); }); current_user_hint_block.appendChild(change_hint_block); @@ -1137,7 +1139,7 @@ function hints_raw_text_to_html(text) { // Рисуем title'ы на всех доступных пользователях, точнее на их аватарках function hints_set_titles_on_users(items) { - $('a').each(function () { + $('a').each(function() { var href = $(this).attr('href'); if (typeof(href) == 'undefined') { return; @@ -1160,7 +1162,7 @@ function hints_set_titles_on_users(items) { // Сохраняем новый хинт function hints_save_new_hint(username, new_hint) { - chrome.storage.sync.get('point_user_hints', function (items) { + chrome.storage.sync.get('point_user_hints', function(items) { items.point_user_hints[username] = new_hint; chrome.storage.sync.set({'point_user_hints': items.point_user_hints}); }); @@ -1176,7 +1178,7 @@ function draw_nesting_level_indicator() { } function draw_nesting_level_indicator_level(obj, level) { - obj.find('> .post').each(function () { + obj.find('> .post').each(function() { var nesting = document.createElement('div'); $(nesting).addClass('nesting').css({ 'width': (10 * level) + 'px' @@ -1188,7 +1190,7 @@ function draw_nesting_level_indicator_level(obj, level) { }); }); - obj.each(function () { + obj.each(function() { var comments = $(this).find('> .comments'); if (comments.length > 0) { draw_nesting_level_indicator_level(comments, level + 1); @@ -1218,20 +1220,20 @@ function comments_count_refresh_tick() { var iframe = document.createElement('iframe'); document.body.appendChild(iframe); - $(iframe).on('load', function () { + $(iframe).on('load', function() { var a = $(iframe.contentDocument.body).find('#main #left-menu #menu-recent .unread'); var b = $(iframe.contentDocument.body).find('#main #left-menu #menu-comments .unread'); var count_recent = (a.length == 0) ? 0 : parseInt(a.text()); var count_comments = (b.length == 0) ? 0 : parseInt(b.text()); - console.log('Comments: ' + count_comments + ', Recent: ' + count_recent); + console.log('Comments: %d, Recent: %d', count_comments, count_recent); if (count_recent > 0) { if (parseInt($('#main #left-menu #menu-recent .unread').text()) != count_recent) { $('#main #left-menu #menu-recent .unread').text(count_recent).show().css({ 'background-color': '#f2ebee', 'color': '#7c3558' }); - setTimeout(function () { + setTimeout(function() { $('#main #left-menu #menu-recent .unread').css({ 'background-color': '#ebeef2', 'color': '#35587c' @@ -1248,7 +1250,7 @@ function comments_count_refresh_tick() { 'background-color': '#f2ebee', 'color': '#7c3558' }); - setTimeout(function () { + setTimeout(function() { $('#main #left-menu #menu-comments .unread').css({ 'background-color': '#ebeef2', 'color': '#35587c' @@ -1264,7 +1266,7 @@ function comments_count_refresh_tick() { // Из-за Same Origin'а я дёргаю несуществующую страницу на том же домене, чтобы получить баджи и, // в то же время не прочитать новые сообщения в ленте, которые могли появиться, если их написал // этот пользователь - 'src': 'https://' + document.domain + '/?tag=' + Math.random(), + 'src': '//' + document.domain + '/?tag=' + Math.random(), 'id': 'debug_iframe' }).css({ 'width': '600px', diff --git a/chrome_point_plus/manifest.json b/chrome_point_plus/manifest.json index 0c41533..21a2e5f 100644 --- a/chrome_point_plus/manifest.json +++ b/chrome_point_plus/manifest.json @@ -1,7 +1,7 @@ { "manifest_version": 2, "name": "Point+", - "version": "1.18.2", + "version": "1.18.3", "default_locale": "ru", "author": "__MSG_ext_author__", "homepage_url": "https://bitbucket.org/skobkin/chrome_point_plus", diff --git a/chrome_point_plus/options.html b/chrome_point_plus/options.html index d0045d1..8c89edb 100644 --- a/chrome_point_plus/options.html +++ b/chrome_point_plus/options.html @@ -178,6 +178,10 @@
+ +
+ +