1
0
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:
Kris Maglione
2011-08-14 23:30:05 -04:00
parent 236a894c89
commit 681af3e618
19 changed files with 719 additions and 594 deletions

View File

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