Fx3 ã® MozRepl ã® search ã¡ã½ãããåããªããªã¼ã¨æã£ã¦ãã¦èª¿ã¹ãå 容ã§ãã ã¡ãªã¿ã«ä»æ§çãªãã®ãå¼ã£å¼µã£ã¦æ¥ã¦ãã¾ãããJSã¯éå¤æ¼¢ãªã®ã§èªå·±è²¬ä»»ã§ãé¡ããã¾ãï¼ã repl.search() ã®å®è£ function search(criteria, context) { context = context || this._workContext;var matcher; if (typeof criteria == "function") { matcher = criteria; } else { matcher = function (name) { return name == criteria; }; } for (var name in context) { if (matcher(name)) { this.print(name); } } } ã£
ããããã¤å¯ã㨠ä»å¹´ã®ã¯ããã«ãããããã¨ãªã¹ããä½ã£ããä»è¦ãã50é ç®ãããªã¹ãã®ãã¡25åãéææ¸ã¿ã ã£ããã¡ããã©ååãããããã¨ããã£ãã¨ãããã¨ã ãç§ã«ãã¦ã¯ã¾ãã¾ãã®çµæã ã¨æããæºè¶³ã ãããããã¨ãªã¹ãã«ãããã®ã®ãã¡ããããé£ã¹ãããç³»ã¯æ¦ãã¯ãªã¢ãâ¦
Introduction Fresno provides unix command line access to the Javascript interpreter of your running Firefox instance. It is a complement to MozRepl, so you will need to have that installed and running in your firefox. Why do I Care? Here's an example of what you can do. This visits a web page, plucks out the HTML for a portion of the page, and then uses grep to pick out the hrefs. % ./fresno -p ht
ã¾ããããèè ã®éã§ã¯ã©ããå½ããåã®æ¨¡æ§ã§ãã mozIJSSubScriptLoaderã使ã var loader = Cc["@mozilla.org/moz/jssubscript-loader;1"].getService(Ci.mozIJSSubScriptLoader); loader.loadSubScript(url, ctx); ã¨ããã¨ctxãªãã¸ã§ã¯ãã«withããç¶æ ã¨åçã§å¤é¨ã®ã½ã¼ã¹ãå¼ã£å¼µãäºãåºæ¥ã¾ãã ctxãçç¥ããã¨ãç¾å¨ã®ã³ã³ããã¹ãã«ãªãã¾ãã ãµã³ãã« /home/zigorou/Foo.jsãªã©ã«ã var Foo = function() {}; Foo.prototype = { name: function() { alert("ZIGOROu"); } }; /home/zigorou/FooSubScript.jsãªã©ã« func
Connect to Firefox and other Mozilla apps, explore and modify them from the inside, while they're running. Execute Javascript, play with browser GUI, sneak into HTML pages, examine functions and variables, redefine them on the fly, hot-fix bugs, ... MozRepl itself is programmable from within MozRepl. MozRepl is part of MozLab. Watch the video: Exploring the browser, online docs, entering web pages
å ã»ã©åæ ãããããã§ãããªãªã¼ã¹ãã¾ããã ä»åã¯çé¢ç®ã«ããã¥ã¡ã³ããæ¸ããã¤ãããªãã§ã詳細ã¯ããã¥ã¡ã³ãè¦ã¦é ãããã¨ã podããæç²ããã°ã use strict; use warnings; use MozRepl; my $repl = MozRepl->new; $repl->setup; ### You must write it. $repl->execute(q|window.alert("Internet Explorer:<")|); print $repl->repl_inspect({ source => "window" }); print $repl->repl_search({ pattern => "^getElement", source => "document"}); ãªãã¦æãã§ä½¿ãã¾ãã pluginã«ããæ¡å¼µãå¯è½ãªã®ã§ãããplugin
ãã®è¨äº(http://la.ma.la/blog/diary_200609280045.htm)ãåèã«ãMozLab(http://dev.hyperstruct.net/trac/mozlab)ã®MozReplã使ã£ã¦ãVimã§ãã¡ã¤ã«(*.html,*.htm,*.js,*.css)ä¿åæã«Firefoxããªãã¼ãããVimã¹ã¯ãªãããä½ã£ã¦ã¿ãã :Setreloadfirefoxã§Vimã§ãã¡ã¤ã«ãä¿åãããã³ã«Firefox(MozReplãéå§ãã¦ãã)ããªãã¼ãããã¾ãã ããä¸åº¦:Setreloadfirefoxã¨å ¥åããã¨è§£é¤ããã¾ãã â»rubyãå¿ è¦ã§ãã â»perl, python ã使ã£ãã¹ã¯ãªãããå ¬éãã¾ãããVimã§ãã¡ã¤ã«ä¿åæã«Firefoxããªãã¼ããã(with MozLab) : Serendip - Webãã¶ã¤ã³ã»ãã¼ã ãã¼ã¸å¶ä½ demo
ãã¾ãã¡åãã£ã¦ãªããã ãã©ãPerlã®perlsh,Pythonã®å¯¾è©±åã·ã§ã«,Rubyã®irbã®ãããªä½¿ãæ¹ãã§ããã¿ããã§ãããFirefoxãåºåã«ã§ããJavascriptã·ã§ã«ã¨ãã£ãæãã§ãããããFirefoxã®å é¨ã§è¡ããã¦ããJavascriptã®å¦çãè¦ãè¦ããã·ã§ã«åã®ã¤ã³ã¿ã¼ãã§ã¼ã¹ãããªãReplã¨ãããªãã¸ã§ã¯ããã·ã§ã«ã¿ãããªå½¹å²ãæããã¦ãã¦ãrepl.method()ã¨ããæãã§ã¡ã½ãããå¼ã³åºãã¦å¯¾è©±åã®æä½ãã§ãããä»»æã®Javascrptã³ã¼ããæã¡è¾¼ããã¨ãã§ãã¾ããReplãªãã¸ã§ã¯ãèªèº«ãJavascriptã®ãããªã®ã§ãReplãæ¸ãæãããã¨ãå¯è½ã¿ããã åãã®ä¸æ© #()ãã¤ããã¨é¢æ°ã®å®è¡ repl>repl.home() [object ChromeWindow] #()ãã¤ããªãã¨ãªãã¸ã§ã¯ãã®ä¸èº«ãè¦ãã repl> repl
ã©ã³ãã³ã°
ã©ã³ãã³ã°
ã©ã³ãã³ã°
ãªãªã¼ã¹ãé害æ å ±ãªã©ã®ãµã¼ãã¹ã®ãç¥ãã
ææ°ã®äººæ°ã¨ã³ããªã¼ã®é ä¿¡
å¦çãå®è¡ä¸ã§ã
j次ã®ããã¯ãã¼ã¯
kåã®ããã¯ãã¼ã¯
lãã¨ã§èªã
eã³ã¡ã³ãä¸è¦§ãéã
oãã¼ã¸ãéã
{{#tags}}- {{label}}
{{/tags}}