diff options
author | anekos | 2010-09-15 10:14:32 +0000 |
---|---|---|
committer | anekos | 2010-09-15 10:14:32 +0000 |
commit | 959c1752e36ccccbb0d8c606f5913ba491208ed3 (patch) | |
tree | 1736ae8efaa2a6927723e4812f71013c33015d49 /auto_detect_link.js | |
parent | d1ddafb3af780a521bce51de098ffe6b0a47cbff (diff) | |
download | vimperator-plugins-959c1752e36ccccbb0d8c606f5913ba491208ed3.tar.bz2 |
AutoPagerize がない場合にエラーになるの修正
git-svn-id: http://svn.coderepos.org/share/lang/javascript/vimperator-plugins/trunk@38474 d0d07461-0603-4401-acd4-de1884942a52
Diffstat (limited to 'auto_detect_link.js')
-rw-r--r-- | auto_detect_link.js | 17 |
1 files changed, 11 insertions, 6 deletions
diff --git a/auto_detect_link.js b/auto_detect_link.js index 6e02af2..6718495 100644 --- a/auto_detect_link.js +++ b/auto_detect_link.js @@ -3,10 +3,10 @@ var PLUGIN_INFO = <name>Auto Detect Link</name> <description>Find (next|previous) link, and jump.</description> <description lang="ja">(次|前)っぽいページへのリンクを探してジャンプ</description> - <version>1.8.1</version> + <version>1.8.2</version> <author mail="anekos@snca.net" homepage="http://d.hatena.ne.jp/nokturnalmortum/">anekos</author> <minVersion>2.0pre</minVersion> - <maxVersion>2.2pre</maxVersion> + <maxVersion>2.4</maxVersion> <updateURL>http://svn.coderepos.org/share/lang/javascript/vimperator-plugins/trunk/auto_detect_link.js</updateURL> <license document="http://creativecommons.org/licenses/by-sa/3.0/"> Creative Commons Attribution-Share Alike 3.0 Unported @@ -146,11 +146,16 @@ var PLUGIN_INFO = } const APPREF = 'greasemonkey.scriptvals.http://swdyh.yu.to//AutoPagerize.cacheInfo'; - let ap_cache = eval(Application.prefs.getValue(APPREF, null)); + let ap_cache; + try { + ap_cache = eval(Application.prefs.getValue(APPREF, null)); - for each (let cache in ap_cache) { - cache.info = cache.info.filter(function (i) 'url' in i); - cache.info.sort(function (a, b) b.url.length - a.url.length); + for each (let cache in ap_cache) { + cache.info = cache.info.filter(function (i) 'url' in i); + cache.info.sort(function (a, b) b.url.length - a.url.length); + } + } catch (e) { + liberator.log('ap_cache evaluationg error. no autopagerize?: \n' + e); } |