mirror of
https://github.com/gryf/pentadactyl-pm.git
synced 2025-12-20 22:47:59 +01:00
Sorry, minor feature that's more of a bug fix: Options/commands/mappings in :help now behave as links.
This commit is contained in:
8
common/content/help.js
Normal file
8
common/content/help.js
Normal file
@@ -0,0 +1,8 @@
|
|||||||
|
|
||||||
|
const liberator = Components.classes["@mozilla.org/embedcomp/window-watcher;1"]
|
||||||
|
.getService(Components.interfaces.nsIWindowWatcher)
|
||||||
|
.activeWindow
|
||||||
|
.liberator;
|
||||||
|
|
||||||
|
liberator.help(decodeURIComponent(document.location.search.substr(1)));
|
||||||
|
|
||||||
7
common/content/help.xul
Normal file
7
common/content/help.xul
Normal file
@@ -0,0 +1,7 @@
|
|||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
|
||||||
|
<window xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul">
|
||||||
|
<script type="application/x-javascript;version=1.8"
|
||||||
|
src="chrome://liberator/content/help.js"/>
|
||||||
|
</window>
|
||||||
|
|
||||||
@@ -10,9 +10,10 @@ email=stubenschrott@gmx.net
|
|||||||
"http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
|
"http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
|
||||||
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="{lang=en}">
|
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="{lang=en}">
|
||||||
<head>
|
<head>
|
||||||
<meta http-equiv="Content-Type" content="application/xhtml+html; charset={encoding=UTF-8}" />
|
<meta http-equiv="Content-Type" content="application/xhtml+xml; charset={encoding=UTF-8}" />
|
||||||
<meta name="generator" content="AsciiDoc {asciidoc-version}" />
|
<meta name="generator" content="AsciiDoc {asciidoc-version}" />
|
||||||
<link rel="stylesheet" href="xhtml11.css" type="text/css" />
|
<link rel="stylesheet" href="xhtml11.css" type="text/css" />
|
||||||
|
<script type="application/x-javascript;version=1.8" src="help.js"></script>
|
||||||
<title>{doctitle}</title>
|
<title>{doctitle}</title>
|
||||||
</head>
|
</head>
|
||||||
<body>
|
<body>
|
||||||
@@ -73,10 +74,10 @@ HEADER=<div style="float: right; padding-left: 1px;"> <form action="https://www.
|
|||||||
[tags]
|
[tags]
|
||||||
tag=<span class="tag">|</span>
|
tag=<span class="tag">|</span>
|
||||||
key=<div class="key">|</div>
|
key=<div class="key">|</div>
|
||||||
option=<span class="option">|</span>
|
option=<a class="option" href="#">|</a>
|
||||||
option2=<span class="option">'|'</span>
|
option2=<a class="option" href="#">'|'</a>
|
||||||
command=<span class="command">|</span>
|
command=<a class="command">|</a>
|
||||||
mapping=<span class="mapping">|</span>
|
mapping=<a class="mapping">|</a>
|
||||||
argument=<span class="argument">|</span>
|
argument=<span class="argument">|</span>
|
||||||
argument2=<span class="argument">{|}</span>
|
argument2=<span class="argument">{|}</span>
|
||||||
argument3=<span class="argument">[|]</span>
|
argument3=<span class="argument">[|]</span>
|
||||||
|
|||||||
@@ -68,7 +68,7 @@ ________________________________________________________________________________
|
|||||||
||:tabopen[!] [arg1], [arg2], ...|| +
|
||:tabopen[!] [arg1], [arg2], ...|| +
|
||||||
||t||
|
||t||
|
||||||
________________________________________________________________________________
|
________________________________________________________________________________
|
||||||
Just like help::open[browsing.html#opening], but opens the resulting web page(s)
|
Just like [c]:open[c], but opens the resulting web page(s)
|
||||||
in a new tab. When used with [!], the 'tabopen' value of the 'activate' option
|
in a new tab. When used with [!], the 'tabopen' value of the 'activate' option
|
||||||
is negated.
|
is negated.
|
||||||
________________________________________________________________________________
|
________________________________________________________________________________
|
||||||
|
|||||||
7
vimperator/locale/en-US/help.js
Normal file
7
vimperator/locale/en-US/help.js
Normal file
@@ -0,0 +1,7 @@
|
|||||||
|
|
||||||
|
document.addEventListener("click", function (event) {
|
||||||
|
let elem = event.target;
|
||||||
|
if (/^(option|mapping|command)$/.test(elem.className))
|
||||||
|
elem.setAttribute("href", "chrome://liberator/content/help.xul?" + encodeURIComponent(elem.textContent.replace(/\s.*/, "")));
|
||||||
|
}, true);
|
||||||
|
|
||||||
@@ -335,6 +335,14 @@ fieldset.paypal {
|
|||||||
font-weight: bold;
|
font-weight: bold;
|
||||||
color: #106326;
|
color: #106326;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.option, .mapping, .command {
|
||||||
|
text-decoration: none;
|
||||||
|
}
|
||||||
|
.option:hover, .mapping:hover, .command:hover {
|
||||||
|
text-decoration: underline;
|
||||||
|
}
|
||||||
|
|
||||||
.quoteblock {
|
.quoteblock {
|
||||||
margin-left: 140px;
|
margin-left: 140px;
|
||||||
padding-bottom: 10px;
|
padding-bottom: 10px;
|
||||||
|
|||||||
Reference in New Issue
Block a user