1
0
mirror of https://github.com/gryf/pentadactyl-pm.git synced 2025-12-20 21:18:00 +01:00

Add \ mapping to toggle between rendered and source view.

Like lynx, elinks et al.
This commit is contained in:
Doug Kearns
2009-05-22 18:30:39 +10:00
parent da89552a1e
commit 62853b2498
4 changed files with 24 additions and 1 deletions

View File

@@ -365,6 +365,18 @@ function Buffer() //{{{
"View source with an external editor",
function () { buffer.viewSource(null, true); });
mappings.add(myModes, ["\\"],
"Toggle between rendered and source view",
function ()
{
const scheme = "view-source";
if (util.newURI(buffer.URL).scheme == scheme)
liberator.open(buffer.URL.substr(scheme.length + 1));
else
liberator.open(scheme + ":" + buffer.URL)
});
mappings.add(myModes, ["gi"],
"Focus last used input field",
function (count)