aboutsummaryrefslogtreecommitdiffstats
path: root/_libly.js
diff options
context:
space:
mode:
authorteramako2013-04-10 22:14:28 +0900
committerteramako2013-04-10 22:14:28 +0900
commit596ae3e9f228d34891f8e52225205e78371b4828 (patch)
tree3e8338fb8c47c07be169a227a5112bab78b7ceba /_libly.js
parent004f9e2fd284912c3b70401310e118493c7fa8d3 (diff)
parent8eb425bbdb21e37603603db84d444c90a2d30fb5 (diff)
downloadvimperator-plugins-596ae3e9f228d34891f8e52225205e78371b4828.tar.bz2
Merge branch '3.6'
Diffstat (limited to '_libly.js')
-rw-r--r--_libly.js24
1 files changed, 6 insertions, 18 deletions
diff --git a/_libly.js b/_libly.js
index 9471fc4..be989d7 100644
--- a/_libly.js
+++ b/_libly.js
@@ -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;