/* * ステータスバーにはてブ数を表示 * * Usage: * let g:ego_counter_uri = 'Your site URI' * or * js liberator.globalVariables.ego_counter_hatenaId = 'Your site URI' * * ex. * let g:ego_counter_uri = 'http://d.hatena.ne.jp/snaka72' * */ (function() { const MY_SITE = liberator.globalVariables.ego_counter_uri || ''; let update = function(color) { myHatebu.setAttribute( 'src', <>http://b.hatena.ne.jp/bc/{color}/{MY_SITE}/.toSource() ); }; let rotate = (function() { var current; var colors = "bl de dg gr pr br rd sp pk te lg lb wh li or".split(" "); return function(next) { if (!next) return current; current = colors.shift(); colors.push(current); return current; }; })(); let myHatebu = document.getElementById('status-bar') .insertBefore(document.createElement('statusbarpanel'), document.getElementById('security-button') .nextSibling); myHatebu.setAttribute('id', 'my-hatebu-count-icon'); myHatebu.setAttribute('class', 'statusbarpanel-iconic'); update(rotate(true)); setInterval(function() update(rotate(true)), 1000 * 60 * 10); myHatebu.addEventListener("click", function(event){ update(rotate(true)); }, false); })() r'>master for Vimperator plugins
aboutsummaryrefslogtreecommitdiffstats
path: root/history-search-backward.js
blob: b3f36782acd9de24e99c7b9139c44ff6660c9fc6 (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