diff options
Diffstat (limited to 'notifier/subject_hatelabo_bottle.js')
-rw-r--r-- | notifier/subject_hatelabo_bottle.js | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/notifier/subject_hatelabo_bottle.js b/notifier/subject_hatelabo_bottle.js index 7bd93c6..c74756d 100644 --- a/notifier/subject_hatelabo_bottle.js +++ b/notifier/subject_hatelabo_bottle.js @@ -46,9 +46,9 @@ notifier.subject.register(notifier.SubjectHttp, { !cache.some(function(c) c.textContent == element.textContent)), buildMessages: function(diff) { return diff.map($U.bind(this, function(d) { - var permalink = $U.getNodesFromXPath('descendant::a[@class="hatena-star-uri"]', d); - if (permalink.length > 0) - permalink = URL + permalink[0]; + var permalink = $U.getFirstNodeFromXPath('descendant::a[@class="hatena-star-uri"]', d); + if (permalink) + permalink = URL + permalink; return new notifier.Message('Hatelabo bottle', $U.xmlSerialize(d), permalink) })); } |