:: StoryTitle Adding Functionality in SugarCube :: UserScript[script] Macro.add("currenttime", { tags: null, handler: function() { // Try the following code and catch any errors try { // Get the current time and save it to the payload this.payload.contents = new Date(); // Wikify (and append) the current payload contents jQuery(this.output).wiki(this.payload.contents); } catch (ex) { // Return any errors return this.error("Error: " + ex.message); } } }); :: Start <><>