1
0
mirror of https://github.com/gryf/pentadactyl-pm.git synced 2025-12-23 07:58:00 +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

@@ -316,20 +316,20 @@ liberator.Buffer = function () //{{{
"Open (put) a URL based on the current clipboard contents in a new buffer",
function ()
{
liberator.open(readFromClipboard(),
liberator.open(liberator.util.readFromClipboard(),
/\bpaste\b/.test(liberator.options["activate"]) ?
liberator.NEW_BACKGROUND_TAB : liberator.NEW_TAB);
});
liberator.mappings.add(modes, ["p", "<MiddleMouse>"],
"Open (put) a URL based on the current clipboard contents in the current buffer",
function () { liberator.open(readFromClipboard()); });
function () { liberator.open(liberator.util.readFromClipboard()); });
liberator.mappings.add(modes, ["P"],
"Open (put) a URL based on the current clipboard contents in a new buffer",
function ()
{
liberator.open(readFromClipboard(),
liberator.open(liberator.util.readFromClipboard(),
/\bpaste\b/.test(liberator.options["activate"]) ?
liberator.NEW_TAB : liberator.NEW_BACKGROUND_TAB);
});
@@ -350,7 +350,7 @@ liberator.Buffer = function () //{{{
{
var sel = liberator.buffer.getCurrentWord();
if (sel)
liberator.copyToClipboard(sel, true);
liberator.util.copyToClipboard(sel, true);
else
liberator.beep();
});