mirror of
https://github.com/gryf/pentadactyl-pm.git
synced 2026-02-22 00:15:46 +01:00
Move DOM and config properties from the util namespace to the DOM and config namespaces, respectively.
This commit is contained in:
@@ -116,13 +116,13 @@ var Bookmarks = Module("bookmarks", {
|
||||
*/
|
||||
addSearchKeyword: function addSearchKeyword(elem) {
|
||||
if (elem instanceof HTMLFormElement || elem.form)
|
||||
var [url, post, charset] = util.parseForm(elem);
|
||||
var { url, postData, charset } = DOM(elem).formData;
|
||||
else
|
||||
var [url, post, charset] = [elem.href || elem.src, null, elem.ownerDocument.characterSet];
|
||||
var [url, postData, charset] = [elem.href || elem.src, null, elem.ownerDocument.characterSet];
|
||||
|
||||
let options = { "-title": "Search " + elem.ownerDocument.title };
|
||||
if (post != null)
|
||||
options["-post"] = post;
|
||||
if (postData != null)
|
||||
options["-postData"] = postData;
|
||||
if (charset != null && charset !== "UTF-8")
|
||||
options["-charset"] = charset;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user