diff options
author | teramako | 2008-10-15 15:28:45 +0000 |
---|---|---|
committer | teramako | 2008-10-15 15:28:45 +0000 |
commit | 3dc8e4e07e475876801ff602bd9e047c92203934 (patch) | |
tree | d41e994a207d77c8ba74c80bce7a0879b2517c10 /bufferecho.js | |
parent | 4ca3ee635c6624add6514b2b8a5675ef61c67813 (diff) | |
download | vimperator-plugins-3dc8e4e07e475876801ff602bd9e047c92203934.tar.bz2 |
namespaceの省略(vimperator CVS headと旧版との互換性維持のため)
git-svn-id: http://svn.coderepos.org/share/lang/javascript/vimperator-plugins/trunk@21395 d0d07461-0603-4401-acd4-de1884942a52
Diffstat (limited to 'bufferecho.js')
-rw-r--r-- | bufferecho.js | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/bufferecho.js b/bufferecho.js index dc287be..39398dc 100644 --- a/bufferecho.js +++ b/bufferecho.js @@ -24,27 +24,27 @@ function htmlEscape(str){ .replace(">",">","g"); } -liberator.commands.addUserCommand(['bufferecho','becho'],'Display results of JavaScript to a buffer(browser)', +commands.addUserCommand(['bufferecho','becho'],'Display results of JavaScript to a buffer(browser)', function(args, special){ liberator.plugins.buffer_echo.open(args, special); },{ - completer: function(filter) liberator.completion.javascript(filter) + completer: function(filter) completion.javascript(filter) },true ); var manager = { append: function(htmlString){ - var body = liberator.buffer.evaluateXPath('/html/body').snapshotItem(0); + var body = buffer.evaluateXPath('/html/body').snapshotItem(0); body.innerHTML += htmlString; }, open: function(str, forceNewTab) { var result = execute(str); - if (typeof(result) == "object") result = liberator.util.objectToString(result,true); + if (typeof(result) == "object") result = util.objectToString(result,true); var data = '<div><h1>' + htmlEscape(str) + '</h1><pre>' + result + '</pre></div>'; - if (liberator.buffer.title == title && !forceNewTab){ + if (buffer.title == title && !forceNewTab){ this.append(data); return; } - var where = liberator.buffer.URL == "about:blank" ? liberator.CURRENT_TAB : liberator.NEW_TAB; + var where = buffer.URL == "about:blank" ? liberator.CURRENT_TAB : liberator.NEW_TAB; liberator.open([prefix + '<title>'+title+'</title>' + data], where); } }; |