// INFO // var INFO = Mitsugu Oyama MIT

You can get Watchizu URL of current machine location by this plugin.

'Watchizu' :watchizu

You can get Watchizu URL of current machine location by this plugin.

; (function(){ commands.addUserCommand( ['watchize'], 'Get Watchize URL of current location', function(){ let form=function(v){ let ret=String(v); if(ret.length<2) ret='0'+ret; return ret; }; let conv=function(bl){ let h=Math.floor(bl); let m=Math.floor((bl-h)*60); let s=Math.floor((bl-h-(m/60))*3600); return ''+h+form(m)+form(s); }; let strURL='http://watchizu.gsi.go.jp/watchizu.aspx'; let Cc=Components.classes; let Ci=Components.interfaces; let geolocation=Cc["@mozilla.org/geolocation;1"] .getService(Ci.nsIDOMGeoGeolocation); geolocation.getCurrentPosition(function(position){ let strL='?b='+conv(position.coords.latitude) +'&l='+conv(position.coords.longitude); liberator.echo(strURL+strL); util.copyToClipboard(strURL+strL,true); }); } ); })(); td class='sub right'>
aboutsummaryrefslogtreecommitdiffstats
path: root/option-selector.js
blob: ee29dc784012e24474fbd645136de0fe3f28cef9 (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