mirror of
https://github.com/gryf/pentadactyl-pm.git
synced 2025-12-23 17:42:27 +01:00
Fix cpt= verifier
This commit is contained in:
@@ -1331,16 +1331,17 @@ function Completion() //{{{
|
||||
context.title = [keyword + " Quick Search"];
|
||||
context.background = true;
|
||||
context.anchored = true;
|
||||
context.quote = decodeURIComponent;
|
||||
context.generate = function () {
|
||||
let [begin, end] = item.url.split("%s");
|
||||
|
||||
return history.get({ uri: window.makeURI(begin), uriIsPrefix: true }).map(function (item) {
|
||||
let rest = item.url.length - end.length;
|
||||
let query = item.url.substring(begin.length, rest);
|
||||
item.url = query;
|
||||
if (item.url.substr(rest) == end && query.indexOf("&") == -1)
|
||||
{
|
||||
item.url = decodeURIComponent(query);
|
||||
return item;
|
||||
}
|
||||
}).filter(function (k) k);
|
||||
};
|
||||
});
|
||||
|
||||
@@ -317,7 +317,7 @@ function CommandLine() //{{{
|
||||
"charlist", "sfl",
|
||||
{
|
||||
completer: function completer(filter) [k for each (k in completion.urlCompleters)],
|
||||
validator: function validator(value) value in completion.urlCompleters
|
||||
validator: function validator(value) Array.every(value, function (v) v in completion.urlCompleters)
|
||||
});
|
||||
|
||||
options.add(["history", "hi"],
|
||||
@@ -1300,7 +1300,6 @@ function ItemList(id) //{{{
|
||||
if (container.collapsed)
|
||||
div.style.minWidth = document.getElementById("liberator-commandline").scrollWidth + "px";
|
||||
minHeight = Math.max(minHeight, completionBody.getBoundingClientRect().bottom);
|
||||
minHeight = 400;
|
||||
container.height = minHeight;
|
||||
div.style.minWidth = undefined;
|
||||
// FIXME: Belongs elsewhere.
|
||||
|
||||
Reference in New Issue
Block a user