From 959c1752e36ccccbb0d8c606f5913ba491208ed3 Mon Sep 17 00:00:00 2001 From: anekos Date: Wed, 15 Sep 2010 10:14:32 +0000 Subject: AutoPagerize がない場合にエラーになるの修正 git-svn-id: http://svn.coderepos.org/share/lang/javascript/vimperator-plugins/trunk@38474 d0d07461-0603-4401-acd4-de1884942a52 --- auto_detect_link.js | 17 +++++++++++------ 1 file changed, 11 insertions(+), 6 deletions(-) (limited to 'auto_detect_link.js') 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 = Auto Detect Link Find (next|previous) link, and jump. (次|前)っぽいページへのリンクを探してジャンプ - 1.8.1 + 1.8.2 anekos 2.0pre - 2.2pre + 2.4 http://svn.coderepos.org/share/lang/javascript/vimperator-plugins/trunk/auto_detect_link.js 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); } -- cgit v1.2.3