mirror of
https://github.com/gryf/pentadactyl-pm.git
synced 2026-01-06 20:14:11 +01:00
Display a sensible prompt rather than a dialog for ;s. Co-opt ;a for "Add bookmark".
This commit is contained in:
@@ -104,7 +104,11 @@ var Bookmarks = Module("bookmarks", {
|
||||
* @param {Element} elem A form element for which to add a keyword.
|
||||
*/
|
||||
addSearchKeyword: function (elem) {
|
||||
let [url, post, charset] = util.parseForm(elem);
|
||||
if (elem instanceof HTMLFormElement || elem.form)
|
||||
var [url, post, charset] = util.parseForm(elem);
|
||||
else
|
||||
var [url, post, charset] = [elem.href || elem.src, null, elem.ownerDocument.characterSet];
|
||||
|
||||
let options = { "-title": "Search " + elem.ownerDocument.title };
|
||||
if (post != null)
|
||||
options["-post"] = post;
|
||||
|
||||
Reference in New Issue
Block a user