diff options
author | hogelog | 2009-07-03 05:04:52 +0000 |
---|---|---|
committer | hogelog | 2009-07-03 05:04:52 +0000 |
commit | bedb35c89c16e4b37800c71fcaef55a280a3c9bf (patch) | |
tree | 4733599b249f7580630bbbae59854da83a0a83bc /nextlink.js | |
parent | 8fa2331dc7fda66cd22671a24745d0feafc9fb7a (diff) | |
download | vimperator-plugins-bedb35c89c16e4b37800c71fcaef55a280a3c9bf.tar.bz2 |
* follow HEAD(2.2pre)
git-svn-id: http://svn.coderepos.org/share/lang/javascript/vimperator-plugins/trunk@34267 d0d07461-0603-4401-acd4-de1884942a52
Diffstat (limited to 'nextlink.js')
-rw-r--r-- | nextlink.js | 17 |
1 files changed, 8 insertions, 9 deletions
diff --git a/nextlink.js b/nextlink.js index 929ef54..0509303 100644 --- a/nextlink.js +++ b/nextlink.js @@ -14,8 +14,8 @@ var PLUGIN_INFO = <author mail="konbu.komuro@gmail.com" homepage="http://d.hatena.ne.jp/hogelog/">hogelog</author> <version>0.3.9</version> <license>GPL</license> - <minVersion>1.2</minVersion> - <maxVersion>2.0pre</maxVersion> + <minVersion>2.2pre</minVersion> + <maxVersion>2.2pre</maxVersion> <updateURL>http://svn.coderepos.org/share/lang/javascript/vimperator-plugins/trunk/nextlink.js</updateURL> <detail><![CDATA[ == Needs Library == @@ -172,18 +172,17 @@ NextLink.prototype = { this.pager.initDoc(context, doc); }, getSiteinfo: function(doc) { + function valid(prop) + $U.getNodesFromXPath(MICROFORMAT[prop], doc).length > 0; + if (valid("nextLink") && valid("pageElement")) return MICROFORMAT; var url = doc.location.href; for (let i = 0, len = this.siteinfo.length; i < len; i++) { if (url.match(this.siteinfo[i].url) && this.siteinfo[i].url != "^https?://.") { return this.siteinfo[i]; } } - function valid(prop) - $U.getNodesFromXPath(MICROFORMAT[prop], doc).length > 0; - - if (!valid("nextLink") || !valid("pageElement")) return null; - return MICROFORMAT; + return null; }, nextLink: function(count) { if (!this.initialized) { @@ -199,11 +198,11 @@ NextLink.prototype = { customizeMap: function(context) { mappings.addUserMap(context.browserModes, [ prevMap ], "customize by nextlink.js", function(count) context.nextLink(count > 0 ? -1 * count : -1), - { flags: Mappings.flags.COUNT }); + { count: true }); mappings.addUserMap(context.browserModes, [ nextMap ], "customize by nextlink.js", function(count) context.nextLink(count > 0 ? count : 1), - { flags: Mappings.flags.COUNT }); + { count: true }); }, };//}}} |