1
0
mirror of https://github.com/gryf/pentadactyl-pm.git synced 2025-12-23 05:57:58 +01:00

new liberator.util.readFromClipboard, so also non-Firefox extensions have access to the clipboard

This commit is contained in:
Martin Stubenschrott
2008-05-05 13:22:55 +00:00
parent 7b7d39cc8d
commit 04004ebb39
7 changed files with 49 additions and 22 deletions

View File

@@ -463,17 +463,6 @@ const liberator = (function () //{{{
}
},
// XXX? move to liberator.util?
copyToClipboard: function (str, verbose)
{
var clipboardHelper = Components.classes["@mozilla.org/widget/clipboardhelper;1"]
.getService(Components.interfaces.nsIClipboardHelper);
clipboardHelper.copyString(str);
if (verbose)
liberator.echo("Yanked " + str, liberator.commandline.FORCE_SINGLELINE);
},
// Execute an ex command like str=":zoom 300"
execute: function (str, modifiers)
{