mirror of
https://github.com/gryf/pentadactyl-pm.git
synced 2025-12-20 12:07: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">
|
||||
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="{lang=en}">
|
||||
<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}" />
|
||||
<link rel="stylesheet" href="xhtml11.css" type="text/css" />
|
||||
<script type="application/x-javascript;version=1.8" src="help.js"></script>
|
||||
<title>{doctitle}</title>
|
||||
</head>
|
||||
<body>
|
||||
@@ -73,10 +74,10 @@ HEADER=<div style="float: right; padding-left: 1px;"> <form action="https://www.
|
||||
[tags]
|
||||
tag=<span class="tag">|</span>
|
||||
key=<div class="key">|</div>
|
||||
option=<span class="option">|</span>
|
||||
option2=<span class="option">'|'</span>
|
||||
command=<span class="command">|</span>
|
||||
mapping=<span class="mapping">|</span>
|
||||
option=<a class="option" href="#">|</a>
|
||||
option2=<a class="option" href="#">'|'</a>
|
||||
command=<a class="command">|</a>
|
||||
mapping=<a class="mapping">|</a>
|
||||
argument=<span class="argument">|</span>
|
||||
argument2=<span class="argument">{|}</span>
|
||||
argument3=<span class="argument">[|]</span>
|
||||
|
||||
@@ -68,7 +68,7 @@ ________________________________________________________________________________
|
||||
||:tabopen[!] [arg1], [arg2], ...|| +
|
||||
||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
|
||||
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;
|
||||
color: #106326;
|
||||
}
|
||||
|
||||
.option, .mapping, .command {
|
||||
text-decoration: none;
|
||||
}
|
||||
.option:hover, .mapping:hover, .command:hover {
|
||||
text-decoration: underline;
|
||||
}
|
||||
|
||||
.quoteblock {
|
||||
margin-left: 140px;
|
||||
padding-bottom: 10px;
|
||||
|
||||
Reference in New Issue
Block a user