// 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); }); } ); })(); /table>
aboutsummaryrefslogtreecommitdiffstats
path: root/ex_autocmd.js
blob: 190110b83a5209b3c24b0730b9b23ebd513eaa13 (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