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

made :dialogs generic, moved more commands to vim.js

This commit is contained in:
Martin Stubenschrott
2008-02-28 23:37:35 +00:00
parent e02cc7622c
commit 8c45097170
10 changed files with 670 additions and 629 deletions

View File

@@ -1318,6 +1318,26 @@ vimperator.Buffer = function () //{{{
if (!retVal)
vimperator.beep();
},
viewSelectionSource: function()
{
// copied (and tuned somebit) from browser.jar -> nsContextMenu.js
var focusedWindow = document.commandDispatcher.focusedWindow;
if (focusedWindow == window)
focusedWindow = content;
var docCharset = null;
if (focusedWindow)
docCharset = "charset=" + focusedWindow.document.characterSet;
var reference = null;
reference = focusedWindow.getSelection();
var docUrl = null;
window.openDialog("chrome://global/content/viewPartialSource.xul",
"_blank", "scrollbars,resizable,chrome,dialog=no",
docUrl, docCharset, reference, "selection");
}
};
//}}}