From b73bc1a39592bd33730473a9b42d388e81b2c38e Mon Sep 17 00:00:00 2001 From: chylex Date: Sun, 5 Aug 2018 13:42:05 +0200 Subject: [PATCH] Fix comment formatting --- src/tracker/state.js | 40 ++++++++++++++++++++-------------------- 1 file changed, 20 insertions(+), 20 deletions(-) diff --git a/src/tracker/state.js b/src/tracker/state.js index 5d36b5e..5e2c433 100644 --- a/src/tracker/state.js +++ b/src/tracker/state.js @@ -16,8 +16,8 @@ var STATE = (function(){ }; /* - * Resets the state to default values. - */ + * Resets the state to default values. + */ resetState(){ this._savefile = null; this._isTracking = false; @@ -26,8 +26,8 @@ var STATE = (function(){ } /* - * Returns the savefile object, creates a new one if needed. - */ + * Returns the savefile object, creates a new one if needed. + */ getSavefile(){ if (!this._savefile){ this._savefile = new SAVEFILE(); @@ -37,15 +37,15 @@ var STATE = (function(){ } /* - * Returns true if the database file contains any data. - */ + * Returns true if the database file contains any data. + */ hasSavedData(){ return this._savefile != null; } /* - * Returns true if currently tracking message. - */ + * Returns true if currently tracking message. + */ isTracking(){ return this._isTracking; } @@ -59,8 +59,8 @@ var STATE = (function(){ } /* - * Combines current savefile with the provided one. - */ + * Combines current savefile with the provided one. + */ uploadSavefile(fileName, fileObject){ this._lastFileName = fileName; this.getSavefile().combineWith(fileObject); @@ -68,8 +68,8 @@ var STATE = (function(){ } /* - * Triggers a savefile download, if available. - */ + * Triggers a savefile download, if available. + */ downloadSavefile(){ if (this.hasSavedData()){ DOM.downloadTextFile(this._lastFileName || "dht.txt", this._savefile.toJson()); @@ -77,8 +77,8 @@ var STATE = (function(){ } /* - * Registers a Discord server and channel. - */ + * Registers a Discord server and channel. + */ addDiscordChannel(serverName, serverType, channelId, channelName){ var serverIndex = this.getSavefile().findOrRegisterServer(serverName, serverType); @@ -88,8 +88,8 @@ var STATE = (function(){ } /* - * Adds all messages from the array to the specified channel. Returns true if the savefile was updated. - */ + * Adds all messages from the array to the specified channel. Returns true if the savefile was updated. + */ addDiscordMessages(channelId, discordMessageArray){ if (this.getSavefile().addMessagesFromDiscord(channelId, discordMessageArray)){ triggerStateChanged("data", "messages"); @@ -101,15 +101,15 @@ var STATE = (function(){ } /* - * Returns true if the message was added during this session. - */ + * Returns true if the message was added during this session. + */ isMessageFresh(id){ return this.getSavefile().isMessageFresh(id); } /* - * Adds a listener that is called whenever the state changes. The callback is a function that takes subject (generic type) and detail (specific type or data). - */ + * Adds a listener that is called whenever the state changes. The callback is a function that takes subject (generic type) and detail (specific type or data). + */ onStateChanged(callback){ stateChangedEvents.push(callback); }