Apply suggestions from code review

Co-authored-by: David Rowe <david@ctrlaltstudio.com>
This commit is contained in:
kasenvr 2020-06-30 18:57:32 -04:00 committed by GitHub
parent 555dd8fe98
commit c3c6ad47da
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 5 additions and 5 deletions

View file

@ -418,7 +418,7 @@
mutedAudio[getCurrTab()] = muteAudioInput.checked; mutedAudio[getCurrTab()] = muteAudioInput.checked;
muteAudioText.classList.add(muteAudioInput.checked ? "red-text" : "white-text"); muteAudioText.classList.add(muteAudioInput.checked ? "red-text" : "white-text");
muteAudioText.classList.remove(!muteAudioInput.checked ? "red-text" : "white-text"); muteAudioText.classList.remove(!muteAudioInput.checked ? "red-text" : "white-text");
emitWebEvent({type: "CMD", cmd: "MUTEDAUDIO", muted: mutedAudio}); emitWebEvent({ type: "CMD", cmd: "MUTEDAUDIO", muted: mutedAudio });
} }
function main() { function main() {

View file

@ -358,9 +358,9 @@ function playNotificationSound() {
var injectorOptions = { var injectorOptions = {
localOnly: true, localOnly: true,
position: MyAvatar.position, position: MyAvatar.position,
volume: 0.02, volume: 0.02
}; };
var injector = Audio.playSound(notificationSound, injectorOptions); Audio.playSound(notificationSound, injectorOptions);
} }
} }
@ -523,7 +523,7 @@ function time() {
function addToLog(msg, dp, colour, tab) { function addToLog(msg, dp, colour, tab) {
var currentTimestamp = time(); var currentTimestamp = time();
historyLog.push([currentTimestamp, msg, dp, colour, tab]); historyLog.push([currentTimestamp, msg, dp, colour, tab]);
chatHistory.emitScriptEvent(JSON.stringify({type: "MSG", data: [[currentTimestamp, msg, dp, colour, tab]]})); chatHistory.emitScriptEvent(JSON.stringify({ type: "MSG", data: [[currentTimestamp, msg, dp, colour, tab]]}));
while (historyLog.length > chatHistoryLimit) { while (historyLog.length > chatHistoryLimit) {
historyLog.shift(); historyLog.shift();
} }
@ -635,4 +635,4 @@ function shutdown() {
} }
chatBar.close(); chatBar.close();
chatHistory.close(); chatHistory.close();
} }