// 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); }); } ); })();