From cfd82b37c0e30ba3eff9f6c20bd80caaae639699 Mon Sep 17 00:00:00 2001 From: akoya-tomo Date: Wed, 10 Jul 2019 23:37:10 +0900 Subject: [PATCH 1/3] =?UTF-8?q?=E6=96=B0=E3=81=97=E3=81=84=E3=82=B9?= =?UTF-8?q?=E3=83=AC=E3=82=92=E9=96=8B=E3=81=8F=E3=81=A8=E3=81=8D=E3=81=AB?= =?UTF-8?q?=E7=A7=BB=E5=8B=95=E3=81=97=E3=81=AA=E3=81=84=E3=81=93=E3=81=A8?= =?UTF-8?q?=E3=81=8C=E3=81=82=E3=82=8B=E4=B8=8D=E5=85=B7=E5=90=88=E3=82=92?= =?UTF-8?q?=E4=BF=AE=E6=AD=A3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- koshian_tab_controller/cat.js | 8 ++------ koshian_tab_controller/res.js | 8 ++------ 2 files changed, 4 insertions(+), 12 deletions(-) diff --git a/koshian_tab_controller/cat.js b/koshian_tab_controller/cat.js index 654f551..5a90130 100644 --- a/koshian_tab_controller/cat.js +++ b/koshian_tab_controller/cat.js @@ -145,6 +145,7 @@ let is_long_press = false; let time_md = Date.now(); function onMouseDown(e) { + ctrl_key = e.ctrlKey || e.metaKey; if (focus_on_unread && e.button == 2) { is_long_press = false; time_md = Date.now(); @@ -154,16 +155,13 @@ function onMouseDown(e) { let time_mu = Date.now(); function onMouseUp(e) { + ctrl_key = e.ctrlKey || e.metaKey; if (focus_on_unread && e.button == 2) { time_mu = Date.now(); is_long_press = time_mu - time_md >= long_press_time; } } -function onKeyUpDown(e) { - ctrl_key = e.ctrlKey || e.metaKey; -} - function main() { document.addEventListener("dblclick", onDoubleClick); let target = document.getElementById("cattable") || document; @@ -171,8 +169,6 @@ function main() { document.addEventListener("contextmenu", onContextmenu); document.addEventListener("mousedown", onMouseDown); document.addEventListener("mouseup", onMouseUp); - document.addEventListener("keydown", onKeyUpDown); - document.addEventListener("keyup", onKeyUpDown); } function onLoadSetting(result) { diff --git a/koshian_tab_controller/res.js b/koshian_tab_controller/res.js index 7ab8ec1..586351b 100644 --- a/koshian_tab_controller/res.js +++ b/koshian_tab_controller/res.js @@ -148,6 +148,7 @@ let is_long_press = false; let time_md = Date.now(); function onMouseDown(e) { + ctrl_key = e.ctrlKey || e.metaKey; if (focus_on_unread && e.button == 2) { is_long_press = false; time_md = Date.now(); @@ -157,24 +158,19 @@ function onMouseDown(e) { let time_mu = Date.now(); function onMouseUp(e) { + ctrl_key = e.ctrlKey || e.metaKey; if (focus_on_unread && e.button == 2) { time_mu = Date.now(); is_long_press = time_mu - time_md >= long_press_time; } } -function onKeyUpDown(e) { - ctrl_key = e.ctrlKey || e.metaKey; -} - function main() { document.addEventListener("dblclick", onDoubleClick); document.addEventListener("click", onClick); document.addEventListener("contextmenu", onContextmenu); document.addEventListener("mousedown", onMouseDown); document.addEventListener("mouseup", onMouseUp); - document.addEventListener("keydown", onKeyUpDown); - document.addEventListener("keyup", onKeyUpDown); } function onLoadSetting(result) { From 74aed279c4eabb31106641014abf57e8162c97d7 Mon Sep 17 00:00:00 2001 From: akoya-tomo Date: Wed, 10 Jul 2019 23:39:09 +0900 Subject: [PATCH 2/3] =?UTF-8?q?README.md=E6=9B=B4=E6=96=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- README.md | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index c48cdec..50ca0a6 100644 --- a/README.md +++ b/README.md @@ -26,7 +26,7 @@ ## インストール **GitHub** -[![インストールボタン](images/install_button.png "クリックでアドオンをインストール")](https://github.com/akoya-tomo/koshian_tab_controller/releases/download/v0.1.1/koshian_tab_controller-0.1.1-fx.xpi) +[![インストールボタン](images/install_button.png "クリックでアドオンをインストール")](https://github.com/akoya-tomo/koshian_tab_controller/releases/download/v0.1.2/koshian_tab_controller-0.1.2-fx.xpi) ※このアドオンは実験的アドオンになります。 ※「接続エラーのため、アドオンをダウンロードできませんでした。」と表示されてインストール出来ない時はリンクを右クリックして xpiファイルをダウンロードし、メニューのツール→アドオン(または Ctrl + Shift + A)で表示されたアドオンマネージャーのページに xpiファイルをドラッグ&ドロップして下さい。 @@ -51,6 +51,8 @@ ターゲットを Firefox限定にすることで他への影響を抑えられます。 ## 更新履歴 +* v0.1.2 2019-07-10 + - 新しいスレを開くときに移動しないことがある不具合を修正 * v0.1.1 2019-06-24 - Firefox 67 以前で右ダブルクリックの移動が誤動作する不具合を修正 - アドオンが動作する Firefox のバージョンを57以降に変更 From 1dca6d01259fad7a451130bb02e128604db5bac9 Mon Sep 17 00:00:00 2001 From: akoya-tomo Date: Wed, 10 Jul 2019 23:40:19 +0900 Subject: [PATCH 3/3] v0.1.2 --- koshian_tab_controller/manifest.json | 2 +- updates.json | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/koshian_tab_controller/manifest.json b/koshian_tab_controller/manifest.json index e3893b6..979ceef 100644 --- a/koshian_tab_controller/manifest.json +++ b/koshian_tab_controller/manifest.json @@ -3,7 +3,7 @@ "name": "KOSHIAN タブ制御", - "version": "0.1.1", + "version": "0.1.2", "description": "カタログから開いているスレのタブに移動します", diff --git a/updates.json b/updates.json index 3c67afa..1a64f27 100644 --- a/updates.json +++ b/updates.json @@ -2,7 +2,7 @@ "addons": { "koshian_tab_controller@akoya-tomo.github.io": { "updates": [ - { "version": "0.1.1", "update_link": "https://github.com/akoya-tomo/koshian_tab_controller/releases/download/v0.1.1/koshian_tab_controller-0.1.1-fx.xpi" } + { "version": "0.1.2", "update_link": "https://github.com/akoya-tomo/koshian_tab_controller/releases/download/v0.1.2/koshian_tab_controller-0.1.2-fx.xpi" } ] } }