From 3dc8e4e07e475876801ff602bd9e047c92203934 Mon Sep 17 00:00:00 2001 From: teramako Date: Wed, 15 Oct 2008 15:28:45 +0000 Subject: namespaceの省略(vimperator CVS headと旧版との互換性維持のため) git-svn-id: http://svn.coderepos.org/share/lang/javascript/vimperator-plugins/trunk@21395 d0d07461-0603-4401-acd4-de1884942a52 --- copy.js | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) (limited to 'copy.js') diff --git a/copy.js b/copy.js index e724efc..4bcd3e3 100644 --- a/copy.js +++ b/copy.js @@ -78,13 +78,13 @@ liberator.globalVariables.copy_templates.forEach(function(template){ // used when argument is none //const defaultValue = templates[0].label; -liberator.commands.addUserCommand(['copy'],'Copy to clipboard', +commands.addUserCommand(['copy'],'Copy to clipboard', function(arg, special){ liberator.plugins.exCopy.copy(arg, special); },{ completer: function(filter, special){ if (special){ - return liberator.completion.javascript(filter); + return completion.javascript(filter); } var templates = liberator.globalVariables.copy_templates.map(function(template) [template.label, template.value] @@ -103,7 +103,7 @@ liberator.commands.addUserCommand(['copy'],'Copy to clipboard', ); function addUserMap(label, map){ - liberator.mappings.addUserMap([liberator.modes.NORMAL,liberator.modes.VISUAL], map, + mappings.addUserMap([modes.NORMAL,modes.VISUAL], map, label, function(){ liberator.plugins.exCopy.copy(label); }, { rhs: label } @@ -126,8 +126,8 @@ function replaceVariable(str){ var serializer = new XMLSerializer(); htmlsel = serializer.serializeToString(sel.cloneContents()); } - return str.replace(/%TITLE%/g,liberator.buffer.title) - .replace(/%URL%/g,liberator.buffer.URL) + return str.replace(/%TITLE%/g,buffer.title) + .replace(/%URL%/g,buffer.URL) .replace(/%SEL%/g,sel.toString()) .replace(/%HTMLSEL%/g,htmlsel); } @@ -179,11 +179,11 @@ var exCopyManager = { copyString = replaceVariable(template.value); } } - liberator.util.copyToClipboard(copyString); + util.copyToClipboard(copyString); if (isError){ liberator.echoerr('CopiedErrorString: `' + copyString + "'"); } else { - liberator.echo('CopiedString: `' + liberator.util.escapeHTML(copyString) + "'"); + liberator.echo('CopiedString: `' + util.escapeHTML(copyString) + "'"); } } }; -- cgit v1.2.3