Changeset 22317
- Timestamp:
- 10/29/08 18:30:37 (5 years ago)
- Files:
-
- 1 modified
Legend:
- Unmodified
- Added
- Removed
-
lang/javascript/vimperator-plugins/trunk/inspector.js
r21395 r22317 14 14 15 15 /* これやるとFirefox終了時に実行されるんだけど...なぜ? 16 Object.prototype.inspect = function() [16 Object.prototype.inspect = function(){ 17 17 runInspector(this); 18 18 } … … 32 32 var list = []; 33 33 var iframeList = document.getElementsByTagName("iframe"); 34 for (var i=0 ; i< iframeList.length; i++){34 for (var i=0, max=iframeList.length ; i<max ; ++i){ 35 35 if (iframeList[i].hasAttribute("id")) 36 36 list.push([iframeList[i].id,'iframe id']); … … 40 40 commands.addUserCommand(['inspect','dominspect'],'run DOM Inspector', 41 41 function(arg, bang){ 42 if (!arg ){42 if (!arg.string){ 43 43 bang ? inspectDOMDocument(document) : inspectDOMDocument(content.document); 44 44 return; 45 45 } 46 46 var list = getFrameList(); 47 var index = list.map(function($_) $_[0]).indexOf(arg );47 var index = list.map(function($_) $_[0]).indexOf(arg.string); 48 48 var node; 49 49 if (index != -1) node = document.getElementById(list[index][0]).contentDocument; 50 50 if (!node){ 51 51 try { 52 node = window.eval("with(liberator){" + arg + "}");52 node = window.eval("with(liberator){" + arg.string + "}"); 53 53 } catch(e) { 54 54 liberator.echoerr(e);
![(please configure the [header_logo] section in trac.ini)](/share/chrome/site/your_project_logo.png)