/** * Auto switch vimperator key navigation * * @author teramako teramako@gmail.com * @author halt feits * @version 0.6.0 */ (function(){ /* * String or RegExp * e.g) * * /^https?:\/\/mail\.google\.com\// * * 'http://reader.livedoor.com/reader/' */ var ignorePageList = [ /^https?:\/\/mail\.google\.com\//, 'http://reader.livedoor.com/reader/' ]; document.getElementById('appcontent').addEventListener('DOMContentLoaded',function(event){ if ( isMatch(event.target.documentURI) ){ liberator.modes.passAllKeys = true; } else { liberator.modes.passAllKeys = false; } //liberator.log('load page: ' + gBrowser.selectedBrowser.contentDocument.URL); },false); getBrowser().mTabBox.addEventListener('TabSelect',function(event){ var uri = this.parentNode.currentURI.spec; if ( isMatch(uri) ){ liberator.modes.passAllKeys = true; } else { liberator.modes.passAllKeys = false; } //liberator.log('select page: ' + gBrowser.selectedBrowser.contentDocument.URL); },false); function isMatch(uri){ return ignorePageList.some(function(e,i,a){ if (typeof e == 'string'){ return uri.indexOf(e) != -1; } else if (e instanceof RegExp){ return e.test(uri); } }); } })(); fullscreen'>stella/nico-fullscreen for Vimperator plugins
aboutsummaryrefslogtreecommitdiffstats
path: root/yslow.js
blob: c45ce428f72e968796a77835eed3a26386744332 (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