From 24522b23b06efc1fbb8957c2f7e72c93d07f9046 Mon Sep 17 00:00:00 2001 From: anekos Date: Sat, 31 Jul 2010 10:05:59 +0000 Subject: デバッグ情報をまとめる git-svn-id: http://svn.coderepos.org/share/lang/javascript/vimperator-plugins/trunk@38083 d0d07461-0603-4401-acd4-de1884942a52 --- twittperator.js | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) (limited to 'twittperator.js') diff --git a/twittperator.js b/twittperator.js index bb96c1e..bc6523d 100755 --- a/twittperator.js +++ b/twittperator.js @@ -1164,7 +1164,7 @@ } }, 500); - __context__.prev = { + debugVars.prev = { sos: sos, sis: sis, interval: interval, @@ -1494,12 +1494,16 @@ accessor.set("consumerKey", "GQWob4E5tCHVQnEVPvmorQ"); accessor.set("consumerSecret", "gVwj45GaW6Sp7gdua6UFyiF910ffIety0sD1dv36Cz8"); + if (!__context__.hasOwnProperty('__debugVars__')) + __context__.__debugVars__ = {}; + let debugVars = __context__.__debugVars__; + let history; - if (__context__.hasOwnProperty('history')) { - history = __context__.history; + if (debugVars.history) { + history = debugVars.history; liberator.registerObserver('exit', function () accessor.set("history", history)); } else { - history = __context__.history = accessor.get("history", []); + history = debugVars.history = accessor.get("history", []); } let tw = new TwitterOauth(accessor); -- cgit v1.2.3