1
0
mirror of https://github.com/gryf/pentadactyl-pm.git synced 2025-12-20 21:28:00 +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:
Kris Maglione
2008-12-20 19:59:36 -05:00
parent 2c325d4043
commit 2f0132cabc
6 changed files with 37 additions and 6 deletions

8
common/content/help.js Normal file
View 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
View 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>

View File

@@ -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">&#123;|&#125;</span> argument2=<span class="argument">&#123;|&#125;</span>
argument3=<span class="argument">[|]</span> argument3=<span class="argument">[|]</span>

View File

@@ -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.
________________________________________________________________________________ ________________________________________________________________________________

View 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);

View File

@@ -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;