From 43d3b827394e417bc4a8557d024f7f46e0914d00 Mon Sep 17 00:00:00 2001 From: 10sr <8slashes+git@gmail.com> Date: Sat, 24 Aug 2013 13:53:00 +0900 Subject: [PATCH] keysnail.js: add ext chaika-find --- _keysnail.js | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) diff --git a/_keysnail.js b/_keysnail.js index 791bfe8..beaca55 100644 --- a/_keysnail.js +++ b/_keysnail.js @@ -30,6 +30,29 @@ ); })(); +(function(){ + function evalCode(s){ + window.loadURI("javascript:" + s); + } + + function find(s){ + evalCode("Nodes.findBoxText.value='" + encodeURIComponent(s) + "';" + + "FindBox.find();"); + // evalCode("FindBox.show()"); + } + + function readFind(){ + prompt.reader({ + message : "Search word?", + callback : function(s){ + find(s); + } + }); + } + + ext.add("chaika-find", readFind, "chaika find"); +})(); + ////////////////////////////////////// //// sitelocalkeymap var local = {};