From 82fb5f3c45faed4ebf81aca4340162613082dc73 Mon Sep 17 00:00:00 2001 From: Masafumi Oyamada Date: Mon, 5 Jan 2015 22:10:15 +0900 Subject: [PATCH] HoK: Make number hint keys work correctly; Closes #156 Iterator() now converts its keys' types into number. Since we expect keys to be string, we convert them to strings manually. --- plugins/hok.ks.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/plugins/hok.ks.js b/plugins/hok.ks.js index d82cb59..9ad8b20 100644 --- a/plugins/hok.ks.js +++ b/plugins/hok.ks.js @@ -5,7 +5,7 @@ var PLUGIN_INFO = HoK Hit a hint for KeySnail キーボードでリンクを開く - 1.4.2 + 1.4.3 https://github.com/mooz/keysnail/raw/master/plugins/hok.ks.js https://github.com/mooz/keysnail/raw/master/plugins/icon/hok.icon.png mooz @@ -1016,6 +1016,7 @@ var hok = function () { let foundCount = 0; for (let [hintStr, hintElem] in Iterator(hintElements)) { + hintStr = String(hintStr); if (hintStr.indexOf(inputKey) === 0) { if (hintStr != inputKey) hintElem.style.backgroundColor = hintColorCandidates;