From fbe0b698c246eeaed1c63a66d6067b47d002010b Mon Sep 17 00:00:00 2001 From: Nokita Kaze Date: Fri, 26 Dec 2014 09:15:14 +0300 Subject: [PATCH] =?UTF-8?q?=D0=98=D1=81=D0=BF=D1=80=D0=B0=D0=B2=D0=BB?= =?UTF-8?q?=D0=B5=D0=BD=20=D0=BC=D0=B0=D0=B6=D0=BE=D1=80=D0=BD=D1=8B=D0=B9?= =?UTF-8?q?=20=D0=B1=D0=B0=D0=B3,=20=D0=BA=D0=BE=D0=B3=D0=B4=D0=B0=20?= =?UTF-8?q?=D1=87=D0=B5=D1=80=D0=BD=D0=BE=D0=B2=D0=B8=D0=BA=20=D1=81=D0=BE?= =?UTF-8?q?=D0=BE=D0=B1=D1=89=D0=B5=D0=BD=D0=B8=D1=8F=20=D0=B7=D0=B0=D1=82?= =?UTF-8?q?=D0=B8=D1=80=D0=B0=D0=BB=D1=81=D1=8F=20=D1=81=D1=82=D0=B0=D1=80?= =?UTF-8?q?=D1=8B=D0=BC=20=D1=81=D0=BE=D0=BE=D0=B1=D1=89=D0=B5=D0=BD=D0=B8?= =?UTF-8?q?=D0=B5=D0=BC,=20=D0=B5=D1=81=D0=BB=D0=B8=20Point+=20=D0=B3?= =?UTF-8?q?=D1=80=D1=83=D0=B7=D0=B8=D0=BB=D1=81=D1=8F=20=D1=81=D0=BB=D0=B8?= =?UTF-8?q?=D1=88=D0=BA=D0=BE=D0=BC=20=D0=B4=D0=BE=D0=BB=D0=B3=D0=BE=20htt?= =?UTF-8?q?ps://bitbucket.org/skobkin/chrome=5Fpoint=5Fplus/issue/36/-----?= =?UTF-8?q?---------?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- chrome_point_plus/js/point-plus.js | 14 ++++++++++---- chrome_point_plus/manifest.json | 2 +- 2 files changed, 11 insertions(+), 5 deletions(-) diff --git a/chrome_point_plus/js/point-plus.js b/chrome_point_plus/js/point-plus.js index 9b103b2..f37114c 100644 --- a/chrome_point_plus/js/point-plus.js +++ b/chrome_point_plus/js/point-plus.js @@ -981,19 +981,25 @@ function space_key_event() { /* Автосохранение черновиков */ var draft_last_text = ''; // Последний зафиксированный текст +// Восстанавливаем черновик function draft_restore() { - chrome.storage.local.get('point_draft_text', function(items) { - $('#new-post-form #text-input').val(items.point_draft_text); - draft_last_text = items.point_draft_text; + chrome.storage.local.get('point_draft_text', function (items) { + if ($('#new-post-form #text-input').val() == '') { + $('#new-post-form #text-input').val(items.point_draft_text); + draft_last_text = items.point_draft_text; + } }); } +// Установка хандлера function draft_set_save_handler() { + // @hint Не буду я сажать на ивенты, обосрись setInterval(draft_save_check, 5000); - $('#new-post-wrap .footnote').append($('
')); + $('#new-post-wrap .footnote').append($('')); } var draft_save_busy = false; +// Фукнция, дёргающаяся по крону function draft_save_check() { if (draft_save_busy) { return; diff --git a/chrome_point_plus/manifest.json b/chrome_point_plus/manifest.json index 4bb9aa8..69ac6e2 100644 --- a/chrome_point_plus/manifest.json +++ b/chrome_point_plus/manifest.json @@ -1,7 +1,7 @@ { "manifest_version": 2, "name": "Point+", - "version": "1.17.3", + "version": "1.17.4", "default_locale": "ru", "author": "__MSG_ext_author__", "homepage_url": "https://bitbucket.org/skobkin/chrome_point_plus",