aboutsummaryrefslogtreecommitdiffstats
path: root/stella.js
diff options
context:
space:
mode:
authoranekos2010-05-06 11:35:59 +0000
committeranekos2010-05-06 11:35:59 +0000
commit5cefc2a2a94bae5c6f9ce83cecf50fb45954212d (patch)
tree667b78503b8e4811dc7475dae0302ec02f51907a /stella.js
parent3de97419f506b3714ec2330aaebc02c0d7ed3e67 (diff)
downloadvimperator-plugins-5cefc2a2a94bae5c6f9ce83cecf50fb45954212d.tar.bz2
記述順修正
git-svn-id: http://svn.coderepos.org/share/lang/javascript/vimperator-plugins/trunk@37398 d0d07461-0603-4401-acd4-de1884942a52
Diffstat (limited to 'stella.js')
-rw-r--r--stella.js42
1 files changed, 21 insertions, 21 deletions
diff --git a/stella.js b/stella.js
index 2d26a7c..a949937 100644
--- a/stella.js
+++ b/stella.js
@@ -346,27 +346,6 @@ Thanks:
echoError: function (msg)
(void liberator.echoerr(msg)),
- xpathGet: function (xpath, doc, root) {
- if (!doc)
- doc = content.document;
- if (!root)
- root = doc;
- return doc.evaluate(xpath, doc, null, 9, null, 7, null).singleNodeValue;
- },
-
- xpathGets: function (xpath, doc, root) {
- if (!doc)
- doc = content.document;
- if (!root)
- root = doc;
- let result = [];
- let r = doc.evaluate(xpath, root, null, 7, null);
- for (let i = 0, l = r.snapshotLength; i < l; i++) {
- result.push(r.snapshotItem(i));
- }
- return result;
- },
-
fixDoubleClick: function (obj, click, dblClick) {
let clicked = 0;
let original = {click: obj[click], dblClick: obj[dblClick]};
@@ -524,6 +503,27 @@ Thanks:
s.replace(/<br>/g, '<br />').replace(/&nbsp;/g, '<span style="margin-left: 0.5em"></span>');
return replaceHTML(createHTMLDocument(html).documentElement.innerHTML);
+ },
+
+ xpathGet: function (xpath, doc, root) {
+ if (!doc)
+ doc = content.document;
+ if (!root)
+ root = doc;
+ return doc.evaluate(xpath, doc, null, 9, null, 7, null).singleNodeValue;
+ },
+
+ xpathGets: function (xpath, doc, root) {
+ if (!doc)
+ doc = content.document;
+ if (!root)
+ root = doc;
+ let result = [];
+ let r = doc.evaluate(xpath, root, null, 7, null);
+ for (let i = 0, l = r.snapshotLength; i < l; i++) {
+ result.push(r.snapshotItem(i));
+ }
+ return result;
}
};