WIDGETS["recorder"]={area:"tl",width:0,draw() {
  if (!this.width) return;
  g.reset("widget").drawImage(atob("DRSBAAGAHgDwAwAAA8B/D/hvx38zzh4w8A+AbgMwGYDMDGBjAA=="),this.x+1,this.y+2);
  require("recorder").activeRecorders.filter(r=>r.draw).forEach((recorder,i)=>{
    recorder.draw(this.x+15+(i>>1)*12, this.y+(i&1)*12);
  });
},isRecording() {
  return !!(require("Storage").readJSON("recorder.json",1)||{}).recording;
},setRecording(isOn, options) {
  console.log('WIDGETS["recorder"].setRecording is deprecated. Use require("recorder").setRecording instead');
  return require("recorder").setRecording(isOn, options);
},plotTrack(m, options) { // m=instance of openstmap module
  console.log('WIDGETS["recorder"].plotTrack is deprecated. Use require("recorder").plotTrack instead');
  return require("recorder").plotTrack(m, options);
},remove() {
  delete WIDGETS["recorder"];
}};
// load settings, set correct widget width if recording
if (WIDGETS["recorder"].isRecording()) require("recorder").setWidgetWidth(WIDGETS["recorder"]);
