mirror of
https://github.com/gryf/pentadactyl-pm.git
synced 2025-12-22 16:47:59 +01:00
Completion of certain chrome:, resource:, and about: URLs.
This commit is contained in:
@@ -864,6 +864,16 @@ const Completion = Module("completion", {
|
||||
if (complete == null)
|
||||
complete = options["complete"];
|
||||
|
||||
if (/^about:/.test(context.filter)) {
|
||||
context.fork("about", 6, this, function (context) {
|
||||
context.generate = function () {
|
||||
const PREFIX = "@mozilla.org/network/protocol/about;1?what=";
|
||||
return [[k.substr(PREFIX.length), ""] for (k in Cc) if (k.indexOf(PREFIX) == 0)]
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
// Will, and should, throw an error if !(c in opts)
|
||||
Array.forEach(complete, function (c) {
|
||||
let completer = completion.urlCompleters[c];
|
||||
|
||||
Reference in New Issue
Block a user