diff --git a/README.md b/README.md index 49af3b6..85e1ec8 100644 --- a/README.md +++ b/README.md @@ -39,7 +39,7 @@ ## インストール **GitHub** -[![インストールボタン](images/install_button.png "クリックでアドオンをインストール")](https://github.com/akoya-tomo/koshian_image_popuper_kai/releases/download/v1.9.0/koshian_image_popuper_kai-1.9.0-fx.xpi) +[![インストールボタン](images/install_button.png "クリックでアドオンをインストール")](https://github.com/akoya-tomo/koshian_image_popuper_kai/releases/download/v1.9.2/koshian_image_popuper_kai-1.9.2-fx.xpi) ※「接続エラーのため、アドオンをダウンロードできませんでした。」と表示されてインストール出来ない時は、インストールボタンを右クリックしてxpiファイルをダウンロードし、メニューのツール→アドオン(またはCtrl+Shift+A)で表示されたアドオンマネージャーのページにxpiファイルをドラッグ&ドロップして下さい。 @@ -56,6 +56,10 @@ * [futaba thread highlighter K](https://greasyfork.org/ja/scripts/36639-futaba-thread-highlighter-k/)がピックアップしたスレの画像もポップアップさせたい場合はfutaba thread highlighter K **rev13以上**をインストールして下さい。 ## 更新履歴 +* v1.9.2 2020-03-09 + - 縮小中のポップアップにマウスカーソルを移動したときに開く動作をしないように修正 +* v1.9.1 2020-03-09 + - ポップアップからサムネにマウスカーソルを移動したときに閉じる動作をしないように修正 * v1.9.0 2020-02-27 - ポップアップ拡大縮小のアニメーションを追加 * v1.8.1 2019-12-30 diff --git a/koshian_image_popuper/cat.js b/koshian_image_popuper/cat.js index 96a66bc..c413ade 100644 --- a/koshian_image_popuper/cat.js +++ b/koshian_image_popuper/cat.js @@ -86,6 +86,8 @@ class Cell{ this.max_width = 0; this.max_height = 0; this.mouseon = false; + this.mouse_reenter = false; + this.mouse_leave_simple = false; this.popup_timer = null; this.request_timer = null; this.loaded_timer = null; @@ -448,6 +450,7 @@ function onMouseEnter(e){ } cell.mouseon = true; + cell.mouse_leave_simple = false; g_request_time = Math.min(g_request_time, g_popup_time); if(!cell.request_timer){ @@ -469,7 +472,11 @@ function onMouseEnter(e){ if(cell.loaded){ clearInterval(cell.loaded_timer); cell.loaded_timer = null; - cell.show(true); + if (cell.mouse_reenter) { + cell.mouse_reenter = false; + } else { + cell.show(true); + } } }, 10); } @@ -485,6 +492,7 @@ function onMouseLeave(e){ } cell.mouseon = false; + cell.mouse_reenter = false; if (cell.loaded_timer) { clearInterval(cell.loaded_timer); cell.loaded_timer = null; @@ -508,6 +516,10 @@ function onMouseEnterSimple(e){ return; } + cell.mouse_reenter = false; + if (cell.mouse_leave_simple) { + return; + } cell.show(); } @@ -518,6 +530,13 @@ function onMouseLeaveSimple(e){ return; } + let related_target = e.relatedTarget; + if (related_target && e.target.getAttribute("KOSHIAN_INDEX") == related_target.getAttribute("KOSHIAN_INDEX")) { + cell.mouse_reenter = true; + return; + } + + cell.mouse_leave_simple = true; cell.hide(); } diff --git a/koshian_image_popuper/manifest.json b/koshian_image_popuper/manifest.json index 35a62ec..bde5b75 100644 --- a/koshian_image_popuper/manifest.json +++ b/koshian_image_popuper/manifest.json @@ -3,7 +3,7 @@ "name":"KOSHIAN カタログの画像をポップアップで表示 改", - "version":"1.9.0", + "version":"1.9.2", "description":"スレ画像をポップアップ表示します", diff --git a/updates.json b/updates.json index 15ec747..4fc648a 100644 --- a/updates.json +++ b/updates.json @@ -2,9 +2,9 @@ "addons": { "{4B803436-E2DF-11E7-8568-2E3D1843E317}": { "updates": [ - { "version": "1.9.0", - "update_link": "https://github.com/akoya-tomo/koshian_image_popuper_kai/releases/download/v1.9.0/koshian_image_popuper_kai-1.9.0-fx.xpi", - "update_info_url": "https://github.com/akoya-tomo/koshian_image_popuper_kai/releases/download/v1.9.0/update_info.html" + { "version": "1.9.2", + "update_link": "https://github.com/akoya-tomo/koshian_image_popuper_kai/releases/download/v1.9.2/koshian_image_popuper_kai-1.9.2-fx.xpi", + "update_info_url": "https://github.com/akoya-tomo/koshian_image_popuper_kai/releases/download/v1.9.2/update_info.html" } ] }