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:
@@ -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");
|
||||
}
|
||||
};
|
||||
//}}}
|
||||
|
||||
Reference in New Issue
Block a user