Vimperatorèµ·åæã«ãããã©ã°ã¤ã³ã.vimperatorrcã¾ããã§ã¨ã©ã¼ãèµ·ãã£ãããããã ãã©ï¼èµ·åæã«ã¹ãã¼ã¿ã¹ã©ã¤ã³ãä¸ç¬ã ã赤ããªã£ã¦ï¼ã¨ã©ã¼ã¡ãã»ã¼ã¸ãããã«æµãã¦ãã¾ã£ã¦èªããªããã¨ãçµæ§å¤ãä¸ã«ï¼ã¡ãã»ã¼ã¸ãã°ãæ®ããªã(ããï¼)ã®ã§ï¼çµå±ã©ããªã¨ã©ã¼ãèµ·ãã£ãã®ãææ¡ã§ããªãã¦å°ãï¼
ããã§ã¯ä¸ä¾¿ãªã®ã§ï¼liberator.echo()ç³»ã®ã³ãã³ããå®è¡ãããã¨ãã«ï¼ãã®åºåã®ãã°ãFirefoxã®ã¨ã©ã¼ã³ã³ã½ã¼ã«ã«æ®ãè¨å®ãä½ã£ã¦ã¿ãï¼
以ä¸ã.vimperatorrcã®æåã®æ¹ã«æ¸ãã¦ããã°OKï¼å½ããåã ãã©ï¼ãã®è¨å®ãããåã®ã¨ããã§liberator.echo()ç³»ã®ã³ãã³ããå®è¡ããã¦ãã¨ã©ã¼ã³ã³ã½ã¼ã«ã«åºåãããªãã®ã§æ³¨æï¼
javascript <<EOM // for liberator.echo() let (echo_old = liberator.echo) { liberator.echo = function(str, flags) { liberator.log("echo: " + str, 0); return echo_old(str, flags); } } // for liberator.echoerr() let (echoerr_old = liberator.echoerr) { liberator.echoerr = function(str, flags) { liberator.log("echoerr: " + str, 0); return echoerr_old(str, flags); } } // for liberator.echomsg() (only for Vimperator 2.0pre or later) let (echomsg_old = liberator.echomsg) { liberator.echomsg = function(str, flags) { liberator.log("echomsg: " + str, 0); return echomsg_old(str, flags); } } EOM
ããã§ã¨ã©ã¼ã³ã³ã½ã¼ã«ã«echo/echoerr/echomsgã®ãã°ã表示ãããããã«ãªãã¯ãï¼ãã¾ãJavaScriptãç解ãã¦ãªãããå¤ãªæ¸ãæ¹ã«ãªã£ã¦ãããï¼
ã¡ãªã¿ã«echomsgã¯Vimperator2.0pre以éã«ãããªãã³ãã³ããªã®ã§ï¼1.2以åã使ã£ã¦ããã¨ãã¯echomsgã«é¢ããè¨å®ãæ¸ãã¦ãç¡æå³ãªã®ã§æ³¨æï¼
ã¨ã©ã¼ã³ã³ã½ã¼ã«ã表示ãããæ¹æ³ã¯ä»¥ä¸ã®5éãï¼
- :javascript!
- :dialog console
- :emenu ãã¼ã«.ã¨ã©ã¼ã³ã³ã½ã¼ã«
- Ctrl-Shift-J (Win & Linux)ï¼Command-Shift-J (Mac)
- Firefoxã¡ãã¥ã¼ã®ããã¼ã«ãâãã¨ã©ã¼ã³ã³ã½ã¼ã«ããã¯ãªãã¯
è¨å®ããã©ã°ã¤ã³ãæ´æ°ããå¾ã«çºçããã¨ã©ã¼ã®ãã°ããã£ããçºããããããã«ãªã£ããããã§ï¼ãããã°ãããªã楽ã«ãªã£ãï¼ä»ã¾ã§ã¨ã©ã¼ãçºçããã¨ãã¯ä½åº¦ãVimperatorãåèµ·åãã¦ä¸ç¬ãã表示ãããªãã¡ãã»ã¼ã¸ãèªããã¨é å¼µã£ã¦ããããªã¼ï¼ç¬
ä¸ç¬ã ã赤ããªãã¹ãã¼ã¿ã¹ã©ã¤ã³ã«æ©ã¾ããã¦ãã人ã¯ãã²è©¦ãã¦ã¿ã¦ã¯ãããï¼
æ¹åãããç¹ãããã¤ãï¼
- echo/echoerr/echomsgå
¨ã¦ãã¨ã©ã¼ã³ã³ã½ã¼ã«ã®ãã¡ãã»ã¼ã¸ãæ¬ã«è¡¨ç¤ºããã
- echoerrã¯ãã¨ã©ã¼ãæ¬ã«è¡¨ç¤ºããããªã©ãããï¼
- ã¨ã©ã¼ã³ã³ã½ã¼ã«ã§ä¿æãã¦ããããã°ã®æ°ã«ä¸éãããï¼
- ãã°ã®æ°ãå¤ããªãã¨ã©ãã©ãæµãã¦ãã¾ãæ§åï¼
- ãã®å ´ã§ã¨ã©ã¼ã確èªããªããä½æ¥ããã¨ãã¯åé¡ãªããã©â¦ï¼
ãã£ã¨ããæ¹æ³ãç¥ã£ã¦ããæ¹ã¯ãã²æãã¦ãã ããï¼
(è¿½è¨ 2008/12/12 15:26)
id:tsukkeeãããã:messagesã³ãã³ããæãã¦ããã ãã¾ããï¼ã©ãããããã¨ããããã¾ãï¼
- messagesã¯
- bold;">Vimperator 2.0pre以éã®ã¿ä½¿ããã³ãã³ãã§ï¼ã¹ãã¼ã¿ã¹ã©ã¤ã³ã§echoerrã®å±¥æ´ãè¦ããã¨ãã§ãã¦ä¾¿å©ã§ãï¼
ãªãã·ã§ã³'messages'ã§å±¥æ´ã®è¡¨ç¤ºä»¶æ°ãæå®ã§ãã¾ãï¼
ã¾ãï¼ãªãã·ã§ã³'verbose'ã®å¤ãå¤æ´ããã°ï¼echomsgã®å±¥æ´ãå
¨ã¦è¦ããã¨ãã§ããããã«ãªãã¾ã(echoã¯ç¡çï¼)ï¼
" 表示ããå±¥æ´ã®ä»¶æ°ãè¨å®ãã(ããã©ã«ãã¯100) set messages=500 " verboseã¬ãã«ãè¨å®ãï¼å ¨ã¦ã®echoerr/echomsgã®å±¥æ´ãè¦ãããããã«ãã(ããã©ã«ãã¯0) set verbose=15
ãã®ã³ãã³ãï¼Vimperator 1.2ã«ã欲ããã§ãâ¦ï¼