blob: ac3651b18beba38ecbd81d161a435744c7130bae (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
|
// Vimperator plugin: 'Hint Matching with XUL/Migemo'
// Last Change: 21-Oct-2008. Jan 2008
// License: Creative Commons
// Maintainer: Trapezoid <trapezoid.g@gmail.com> - http://unsigned.g.hatena.ne.jp/Trapezoid
// Require: XUL/Migemo extension - https://addons.mozilla.org/ja/firefox/addon/5239
//
// extended hint matching with migemo for vimperator1.2pre(16-Jun-2008)
//
// Usage:
// :set hintmatching = custom
liberator.plugins.customHintMatcher = function(inputString){
var XMigemoCore;
try{
XMigemoCore = Components.classes['@piro.sakura.ne.jp/xmigemo/factory;1']
.getService(Components.interfaces.pIXMigemoFactory)
.getService("ja");
}
catch(ex if ex instanceof TypeError){}
var r = new RegExp(XMigemoCore.getRegExp(inputString));
return function(hintString) r.test(hintString);
}
plugins = {};
plugins.customHintMatcher = liberator.plugins.customHintMatcher;
|