Fix comment formatting

This commit is contained in:
chylex 2018-08-05 13:42:05 +02:00
parent 1d4479e5d2
commit b73bc1a395

View File

@ -16,8 +16,8 @@ var STATE = (function(){
}; };
/* /*
* Resets the state to default values. * Resets the state to default values.
*/ */
resetState(){ resetState(){
this._savefile = null; this._savefile = null;
this._isTracking = false; 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(){ getSavefile(){
if (!this._savefile){ if (!this._savefile){
this._savefile = new 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(){ hasSavedData(){
return this._savefile != null; return this._savefile != null;
} }
/* /*
* Returns true if currently tracking message. * Returns true if currently tracking message.
*/ */
isTracking(){ isTracking(){
return this._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){ uploadSavefile(fileName, fileObject){
this._lastFileName = fileName; this._lastFileName = fileName;
this.getSavefile().combineWith(fileObject); this.getSavefile().combineWith(fileObject);
@ -68,8 +68,8 @@ var STATE = (function(){
} }
/* /*
* Triggers a savefile download, if available. * Triggers a savefile download, if available.
*/ */
downloadSavefile(){ downloadSavefile(){
if (this.hasSavedData()){ if (this.hasSavedData()){
DOM.downloadTextFile(this._lastFileName || "dht.txt", this._savefile.toJson()); 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){ addDiscordChannel(serverName, serverType, channelId, channelName){
var serverIndex = this.getSavefile().findOrRegisterServer(serverName, serverType); 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){ addDiscordMessages(channelId, discordMessageArray){
if (this.getSavefile().addMessagesFromDiscord(channelId, discordMessageArray)){ if (this.getSavefile().addMessagesFromDiscord(channelId, discordMessageArray)){
triggerStateChanged("data", "messages"); 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){ isMessageFresh(id){
return this.getSavefile().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){ onStateChanged(callback){
stateChangedEvents.push(callback); stateChangedEvents.push(callback);
} }