/*** BEGIN LICENSE BLOCK {{{ Copyright (c) 2008 suVene distributable under the terms of an MIT-style license. http://www.opensource.jp/licenses/mit-license.html }}} END LICENSE BLOCK ***/ // PLUGIN_INFO//{{{ var PLUGIN_INFO = {NAME} Twitter change notice(need login). Twitter変更通知(ログイン済みであること)。 suVene 0.1.0 MIT 2.0pre 2.0pre http://svn.coderepos.org/share/lang/javascript/vimperator-plugins/trunk/notifier/subject_twitter_scraper.js ; //}}} (function() { var notifier = liberator.plugins.notifier; if (!notifier) return; var libly = notifier.libly; var $U = libly.$U; var logger = $U.getLogger('subject_twitter_scraper'); var URL = 'http://twitter.com/home'; notifier.subject.register(notifier.SubjectHttp, { interval: 60, options: { url: URL, headers: null, extra: {} }, parse: function(res) { // if (this.count == 0) return []; // for debug return res.getHTMLDocument('id("timeline_body")/tr[@class=contains(concat(" ", @class, " "), " hentry ")]'); }, diff: function(cache, parsed) { var self = this; return parsed.filter(function(element) !cache.some(function(c) self.getContent(c) == self.getContent(element))); }, getContent: function(element) $U.getFirstNodeFromXPath('descendant::span[@class="entry-content"]', element).textContent, buildMessages: function(diff) diff.map($U.bind(this, function(d) new notifier.Message('Twitter', $U.xmlSerialize(d), $U.getFirstNodeFromXPath('descendant::a[@class="entry-date"]', d)))) }); })(); // vim: set fdm=marker sw=4 ts=4 sts=0 et: or-plugins/tree/highlight.js?h=pixiv/desynchronization&id=6892196e1bf3b7a96379e510f2bf515d4fa9911c'>treecommitdiffstats
path: root/highlight.js
blob: 56dd61c8ee5d6a360c5a6b4c983bfefa49c0d3be (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159