diff options
author | teramako | 2013-04-10 22:14:28 +0900 |
---|---|---|
committer | teramako | 2013-04-10 22:14:28 +0900 |
commit | 596ae3e9f228d34891f8e52225205e78371b4828 (patch) | |
tree | 3e8338fb8c47c07be169a227a5112bab78b7ceba /_libly.js | |
parent | 004f9e2fd284912c3b70401310e118493c7fa8d3 (diff) | |
parent | 8eb425bbdb21e37603603db84d444c90a2d30fb5 (diff) | |
download | vimperator-plugins-596ae3e9f228d34891f8e52225205e78371b4828.tar.bz2 |
Merge branch '3.6'
Diffstat (limited to '_libly.js')
-rw-r--r-- | _libly.js | 24 |
1 files changed, 6 insertions, 18 deletions
@@ -6,7 +6,8 @@ http://www.opensource.jp/licenses/mit-license.html }}} END LICENSE BLOCK ***/ // PLUGIN_INFO//{{{ -var PLUGIN_INFO = +/* +var PLUGIN_INFO = xml` <VimperatorPlugin> <name>libly(filename _libly.js)</name> <description>Vimperator plugins library?</description> @@ -130,7 +131,7 @@ Request(url, headers, options): 以下の値はデフォルトで設定される('Content-type'はPOST時のみ) >|| { - 'Accept': 'text/javascript, application/javascript, text/html, application/xhtml+xml, application/xml, text/xml, */*;q=0.1', + 'Accept': 'text/javascript, application/javascript, text/html, application/xhtml+xml, application/xml, text/xml, * /*;q=0.1', 'Content-type': 'application/x-www-form-urlencoded; charset=' + options.encodingの値 } ||< @@ -189,7 +190,8 @@ clearCache: wedata 読込み成功したら、強制的にキャッシュと置き換えるの作って! ]]></detail> -</VimperatorPlugin>; +</VimperatorPlugin>`; +*/ //}}} //if (!liberator.plugins.libly) { @@ -463,21 +465,7 @@ libly.$U = {//{{{ }, xmlToDom: function xmlToDom(node, doc, nodes) { - XML.prettyPrinting = false; - switch (node.nodeKind()) - { - case "text": - return doc.createTextNode(node); - case "element": - let domnode = doc.createElementNS(node.namespace(), node.localName()); - for each (let attr in node.@*) - domnode.setAttributeNS(attr.name() == "highlight" ? NS.uri : attr.namespace(), attr.name(), String(attr)); - for each (let child in node.*) - domnode.appendChild(arguments.callee(child, doc, nodes)); - if (nodes && node.@key) - nodes[node.@key] = domnode; - return domnode; - } + return util.xmlToDom(node, doc, nodes); }, getElementPosition: function(elem) { var offsetTrail = elem; |