æ¬æ ¼çã« lookupDictionary.js ã«åèªã suggest ããã
id:teramako ããyou ãã£ã¡ãã㪠YO!! ãã¦è¨ã£ã¦ãããã®ã§ ( http://h.hatena.ne.jp/teramako/9234099550637892181 ) ãã£ããæåã«ãã®ãã©ã°ã¤ã³ãæ¸ãã¦ããã + å¤æ´ã許å¯ãã¦ããã teramako ããã«æè¬ã
http://coderepos.org/share/browser/lang/javascript/vimperator-plugins/trunk/lookupDictionary.js
ããã¨æ¨æ¥ã®èª¬æã¯ä¸éå端ã ã£ã + ä»æ§ãã¡ãã£ã¨å¤ããã®ã§ã¡ããã¨æ¸ãã
使ãæ¹
ã¾ã lookupDictionary.js ã®ã¤ã³ã¹ãã¼ã«ãä¸è¨ããè½ã¨ãã¦ãããã¡ã¤ã«ã ~/vimperator/plugin/ 以ä¸ã«ããã次ã«è¾æ¸ã®ã¤ã³ã¹ãã¼ã«ã English (US) ( https://addons.mozilla.org/ja/firefox/addon/3497 ) ãã¤ã³ã¹ãã¼ã«ãã¦ãã ããã
Firefox ãåèµ·åããã¨ä»¥ä¸ã®ã³ãã³ãã使ããããã«ãªã£ã¦ããã¯ãã§ããããã¦ãã®å®è¡çµæã 'available dictionaries: en-US' ã¨ãªã£ã¦ããã ( å¥éè¾æ¸ãã¤ã³ã¹ãã¼ã«ããã¦ããæ¹ã¯ãããã表示ããã¾ã ) æºåã¯çµäºã§ãã
- :availabledictionaries
- 使ç¨å¯è½ãªè¾æ¸ã®ä¸è¦§ã表示ãã¾ãã
以ä¸ã§ :eijiro, :goo, :answers ã³ãã³ãã«å¯¾ãã¦è±åèªã® suggest ããªãããããã«ãªãã¾ããå ¥åããæååã suggest çµæã«ãªãå ´å 'not exist' ã¨åºã¾ããããè¦ã spell ã®ç¢ºèªçã«ä½¿ããã¨æãã¾ãã以éã¯è¾æ¸ã£å¼ãã©ã¤ããã楽ãã¿ãã ããã
å¤æ°ã«ããè¨å®ã¯ g:lookupDictionary_enableSuggestion 㨠g:lookupDictionary_beginningWith ãããã¾ãã suggest ã使ããªãããããªãã¦ããã§ãã suggest 使ããªãå ´åã¯ä»¥ä¸ã vimperatorrc ã«æ¸ãã¦ããã¦ãã ããã
let g:lookupDictionary_enableSuggestion='0'
以ä¸ãæ¸ãã¦ããã¨å ¥åããæååããå§ã¾ããã®ã ãã suggest ãããããã«ãªãã¾ããå ¥åæåæ°ã«è¿ããã®ãã suggest ããªãã®ã§çµæçã«åè£ãå°ãªããªãã¾ããè£å®ã«é ¼ããã«èªåã§å ¨é¨æã¡ããå ´åãªããã¯ééãããç®çã®ãã®ãç¾ããªãã®ã§æç¨ããããã¾ããããã¶ã使ãåæã¯æªãã§ãã
let g:lookupDictionary_beginningWith='1'
使ãè¾æ¸ã®å¤æ´
å¥ã«ä½¿ãããè¾æ¸ãããå ´å㯠https://addons.mozilla.org/ja/firefox/browse/type:3 ã«ããè¾æ¸ä¸è¦§ããå¥éã¤ã³ã¹ãã¼ã«ãã¦ãã ããããã®å¾ lookupDictionary.js ã®ã½ã¼ã¹ã³ã¼ãä¸ã®ãµã¤ãå®ç¾© SITE_DEFINITION ã®ä¸ã® dictionary ããããã£ãå¤æ´ãã¾ãã
è±å½ç´³å£«ã®ããªãã®å ´åãã¾ã https://addons.mozilla.org/ja/firefox/addon/3366 ãã English (British) ãã¤ã³ã¹ãã¼ã«ãã¾ãããã®å¾ã§ã½ã¼ã¹ã³ã¼ãã以ä¸ã®ããã«å¤æ´ãã¾ãã
before:
const SITE_DEFINITION = [{ names: ['eiji[ro]'], url: 'http://eow.alc.co.jp/%s/UTF-8/', shortHelp: 'SPACE ALC (è±è¾é on the Web)', xpath: 'id("resultList")', dictionary: 'en-US', },{
after:
const SITE_DEFINITION = [{ names: ['eiji[ro]'], url: 'http://eow.alc.co.jp/%s/UTF-8/', shortHelp: 'SPACE ALC (è±è¾é on the Web)', xpath: 'id("resultList")', dictionary: 'en-GB', },{
åèµ·åãã㨠Queen'S English 㧠suggest ãã¦ãããããã«ãªãã¾ãã
ãµã¤ã追å æã®æ³¨æç¹
æ¢ã«ãµã¤ãã追å ãã¦ããå ´åããããã追å ããå ´åã¯ä½¿ãè¾æ¸ãã¤ã³ã¹ãã¼ã«ããã®ã«å ã㦠SITE_DEFINITION å 㧠dictionary ããããã£ãè¨å®ããããã«ãã¦ãã ãããä¾ã¨ãã¦ã¤ã¿ãªã¢èªã®å ´åã https://addons.mozilla.org/ja/firefox/addon/3053 ã®è¾æ¸ãã¤ã³ã¹ãã¼ã«ããå¾ã«ãµã¤ã追å ã以ä¸ã®ããã«è¡ãã¾ãã
{ names: ['iwaiwakun'], url: 'http://iwaiwakun.com/dic/search.php/-/?q=%s', shortHelp: 'ã¤ã¯ã¤ã¯ãã(ä¼åè¾æ¸)', xpath: './table[3]/tbody/tr/td[2]/table/tbody/tr[2]/td/table', dictionary: 'it-IT', }
使ããè¾æ¸ãµã¤ã㯠http://www.kotoba.ne.jp/ ã§æ¢ãã¨ä¾¿å©ã§ãããã¼ã¸ãªã¯ã¨ã¹ãã GET å½¢å¼ã§ querystring ä¸ã«åèªãæå®ã§ãããµã¤ãããããã§ãã
æè¡çãªããã·
ãµã¤ãå®ç¾©é¨åã wedata ã«ç§»ãã¨å¤¢ãåºããããã ãã¼ã