diff options
author | anekos | 2008-09-27 12:42:57 +0000 |
---|---|---|
committer | anekos | 2008-09-27 12:42:57 +0000 |
commit | ec1d7753bf9f5111e75918e9579c6673de16fda4 (patch) | |
tree | e872e2571c75c567502374d470fbc7f727b22d9d /lookupDictionary.js | |
parent | 3f811186fb2889a1318e9a662bf4828cb0ed25a4 (diff) | |
download | vimperator-plugins-ec1d7753bf9f5111e75918e9579c6673de16fda4.tar.bz2 |
liberator.globalVariables.lookupDictionary_site_definition で、スクリプトを書き換えずに辞書を追加できるようにした。
git-svn-id: http://svn.coderepos.org/share/lang/javascript/vimperator-plugins/trunk@20048 d0d07461-0603-4401-acd4-de1884942a52
Diffstat (limited to 'lookupDictionary.js')
-rw-r--r-- | lookupDictionary.js | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/lookupDictionary.js b/lookupDictionary.js index 20cb00d..918bd41 100644 --- a/lookupDictionary.js +++ b/lookupDictionary.js @@ -37,6 +37,17 @@ const SITE_DEFINITION = [{ dictionary: 'en-US', }]; +let (siteDef = liberator.globalVariables.lookupDictionary_site_definition) { + if (siteDef) { + if (siteDef instanceof String) + siteDef = eval(siteDef); + if (siteDef.forEach instanceof Function) + siteDef.forEach(function (obj) { SITE_DEFINITION.push(obj); }); + else + SITE_DEFINITION.push(siteDef); + } +} + // class definition function SpellChecker() { this.initialize.apply(this, arguments); |