• All you need to do is...

    • Copy _examplePlugin.js to a new JS file in the plugins folder
    • Replace the contents of the init function with something like:

          id: "sendTime",
          icon: "star", 
          title : "Send the current Time", 
          order: 300, 
          area: { 
            name: "code", 
            position: "bottom"
          click: sendTime

    Then add a sendTime function that calls:

    Espruino.Core.Serial.write(`\x03\x10setT­ime(....)\n`, false, function() {
                    Espruino.Core.Notifications.success(`Sen­t the time`, true);

    And I think you'll be done. It might be a nice thing to have as an option, so you could copy the code from https://github.com/espruino/EspruinoWebI­DE/blob/master/js/plugins/codeLink.js which puts an option in Settings which shows/hides the icon when toggled


Avatar for Gordon @Gordon started