aboutsummaryrefslogtreecommitdiffstats
path: root/copy.js
diff options
context:
space:
mode:
authorteramako2008-10-15 15:28:45 +0000
committerteramako2008-10-15 15:28:45 +0000
commit3dc8e4e07e475876801ff602bd9e047c92203934 (patch)
treed41e994a207d77c8ba74c80bce7a0879b2517c10 /copy.js
parent4ca3ee635c6624add6514b2b8a5675ef61c67813 (diff)
downloadvimperator-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 'copy.js')
-rw-r--r--copy.js14
1 files changed, 7 insertions, 7 deletions
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) + "'");
}
}
};