From 6278509a75eb164feeb40e6104b16eaf3a0c2a09 Mon Sep 17 00:00:00 2001 From: suVene Date: Tue, 9 Dec 2008 13:50:40 +0000 Subject: * _libly.js ver.0.1.4 にあわせた修正. [26222] * event 追加. git-svn-id: http://svn.coderepos.org/share/lang/javascript/vimperator-plugins/trunk@26230 d0d07461-0603-4401-acd4-de1884942a52 --- notifier/observer_growl.js | 2 -- notifier/subject_hatelabo_bottle.js | 18 +++++++----------- 2 files changed, 7 insertions(+), 13 deletions(-) (limited to 'notifier') diff --git a/notifier/observer_growl.js b/notifier/observer_growl.js index e585bdc..8f973c6 100644 --- a/notifier/observer_growl.js +++ b/notifier/observer_growl.js @@ -8,8 +8,6 @@ var PLUGIN_INFO = 0.1.0 2.0pre 2.0pre - ; //}}} (function() { diff --git a/notifier/subject_hatelabo_bottle.js b/notifier/subject_hatelabo_bottle.js index abba6cd..2335cad 100644 --- a/notifier/subject_hatelabo_bottle.js +++ b/notifier/subject_hatelabo_bottle.js @@ -8,7 +8,6 @@ var PLUGIN_INFO = 0.1.1 2.0pre 2.0pre - ; //}}} (function() { @@ -21,24 +20,21 @@ var $U = libly.$U; var logger = $U.getLogger('subject_hatelabo_bottle'); var URL = 'http://bottle.hatelabo.jp'; -//var URL = 'http://localhost/index.html?a'; notifier.subject.register(notifier.SubjectHttp, { - interval: 40, + interval: 60, options: { url: URL, headers: null, extra: null }, + preInitialize: function() { + logger.log('preInitialize: '); + }, parse: function(res) { - if (!res.isSuccess() || res.responseText == '') return; - - var dom = res.getHTMLDocument('id("body")//div[contains(concat(" ", @class, " "), " entry ")]'); - if (!dom) return; - - var ret = []; - for (let i = 0, len = dom.childNodes.length; i < len; ret.push(dom.childNodes[i++])); - return ret; + // if (this.count == 0) return []; for debug + if (!res.isSuccess() || res.responseText == '') return null; + return res.getHTMLDocument('id("body")//div[contains(concat(" ", @class, " "), " entry ")]'); }, diff: function(cache, parsed) parsed.filter(function(element) -- cgit v1.2.3