From 5cefc2a2a94bae5c6f9ce83cecf50fb45954212d Mon Sep 17 00:00:00 2001 From: anekos Date: Thu, 6 May 2010 11:35:59 +0000 Subject: 記述順修正 git-svn-id: http://svn.coderepos.org/share/lang/javascript/vimperator-plugins/trunk@37398 d0d07461-0603-4401-acd4-de1884942a52 --- stella.js | 42 +++++++++++++++++++++--------------------- 1 file changed, 21 insertions(+), 21 deletions(-) (limited to 'stella.js') 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(/
/g, '
').replace(/ /g, ''); 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; } }; -- cgit v1.2.3