Skip to content

Commit

Permalink
Merge branch 'develop'
Browse files Browse the repository at this point in the history
  • Loading branch information
akoya-tomo committed Jul 10, 2019
2 parents b9050ed + 1dca6d0 commit fa76bc6
Show file tree
Hide file tree
Showing 5 changed files with 9 additions and 15 deletions.
4 changes: 3 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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ファイルをドラッグ&ドロップして下さい。
Expand All @@ -51,6 +51,8 @@
ターゲットを Firefox限定にすることで他への影響を抑えられます。

## 更新履歴
* v0.1.2 2019-07-10
- 新しいスレを開くときに移動しないことがある不具合を修正
* v0.1.1 2019-06-24
- Firefox 67 以前で右ダブルクリックの移動が誤動作する不具合を修正
- アドオンが動作する Firefox のバージョンを57以降に変更
Expand Down
8 changes: 2 additions & 6 deletions koshian_tab_controller/cat.js
Original file line number Diff line number Diff line change
Expand Up @@ -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();
Expand All @@ -154,25 +155,20 @@ 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;
target.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) {
Expand Down
2 changes: 1 addition & 1 deletion koshian_tab_controller/manifest.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@

"name": "KOSHIAN タブ制御",

"version": "0.1.1",
"version": "0.1.2",

"description": "カタログから開いているスレのタブに移動します",

Expand Down
8 changes: 2 additions & 6 deletions koshian_tab_controller/res.js
Original file line number Diff line number Diff line change
Expand Up @@ -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();
Expand All @@ -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) {
Expand Down
2 changes: 1 addition & 1 deletion updates.json
Original file line number Diff line number Diff line change
Expand Up @@ -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" }
]
}
}
Expand Down

0 comments on commit fa76bc6

Please sign in to comment.