diff options
author | drry | 2008-11-19 19:42:02 +0000 |
---|---|---|
committer | drry | 2008-11-19 19:42:02 +0000 |
commit | cc6d2b299c11b9a9b75ca8bec6f6b24660a79a2f (patch) | |
tree | fcc287b4261b0dff3f4c3b289b0eb44cc5f8f158 /auto_detect_link.js | |
parent | 6da78d8950dfafc740d8fa66272ef516f4441341 (diff) | |
download | vimperator-plugins-cc6d2b299c11b9a9b75ca8bec6f6b24660a79a2f.tar.bz2 |
* 大文字に対応しました。
git-svn-id: http://svn.coderepos.org/share/lang/javascript/vimperator-plugins/trunk@24379 d0d07461-0603-4401-acd4-de1884942a52
Diffstat (limited to 'auto_detect_link.js')
-rw-r--r-- | auto_detect_link.js | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/auto_detect_link.js b/auto_detect_link.js index d273a3b..136878e 100644 --- a/auto_detect_link.js +++ b/auto_detect_link.js @@ -391,15 +391,16 @@ let links = getAllLinks(window.content); // rel="prev|next" - if (1) { - let relValue = next ? /next/ : /prev/; - let link = find(links, function (link) ((typeof link.rel == 'string') && link.rel.match(relValue))); + { + let relValue = next ? /(?:^|[ \t\r\n])next(?:[ \t\n\r]|$)/ + : /(?:^|[ \t\r\n])prev(?:[ \t\n\r]|$)/; + let link = find(links, function (link) ((typeof link.rel == 'string') && relValue.test(link.rel.toLowerCase()))); if (link) return link; } // keywords - if (1) { + { let link; if (patterns.some(function (pattern) { link = find(links, function (link) match(pattern, link)); |