From 383fcce8e3c6234a2be5357e9a4e38e1d249b965 Mon Sep 17 00:00:00 2001 From: colinmorris Date: Wed, 8 Mar 2017 10:09:46 -0800 Subject: [PATCH] turn off debug mode and remove a bunch of unneeded logging --- src/LyricsEditor.js | 4 ---- src/SongSelector.js | 3 +-- src/Songsim.js | 6 ------ src/config.js | 2 +- 4 files changed, 2 insertions(+), 13 deletions(-) diff --git a/src/LyricsEditor.js b/src/LyricsEditor.js index 417a3dc..ddec69a 100644 --- a/src/LyricsEditor.js +++ b/src/LyricsEditor.js @@ -13,7 +13,6 @@ class LyricsEditor extends Component { return; } if (this.ta.value.length === 0) { - console.log('Got blur event with no text entered.'); if (this.props.verse.isBlank()) { // Do nothing return; @@ -31,10 +30,7 @@ class LyricsEditor extends Component { console.error("Tried to edit a song that shouldn't be editable. Bailing."); return; } - // TODO: if the new text value is blank, revert to the old text - console.log("Got text edit event"); if (this.ta.value === this.props.verse.raw) { - console.log("Detected that edit had no effect. Not regenerating verse."); return; } var verse = new CustomVerse(this.ta.value); diff --git a/src/SongSelector.js b/src/SongSelector.js index 36ef75e..a88e4bd 100644 --- a/src/SongSelector.js +++ b/src/SongSelector.js @@ -57,13 +57,12 @@ class SongSelector extends Component { static loadSong(cb, canned) { var r = new XMLHttpRequest(); var url = process.env.PUBLIC_URL + '/canned/' + canned.slug + '.txt'; - console.log(`Loading ${url}`); r.open('GET', url); r.onload = () => { var verse = CannedVerse.fromCanned(canned, r.response); cb(verse); }; - r.onerror = () => { console.log("uh oh"); }; + r.onerror = () => { console.error(`uh oh. Failed to fetch ${url}`); }; r.send(); } render() { diff --git a/src/Songsim.js b/src/Songsim.js index dd671d0..2d99600 100644 --- a/src/Songsim.js +++ b/src/Songsim.js @@ -56,7 +56,6 @@ class Songsim extends Component { componentWillReceiveProps(nextProps) { if (this.props.location.pathname === nextProps.location.pathname) { // Not sure if this is even necessary at this point? - console.log('Ignoring props update'); return; } // new songid @@ -84,7 +83,6 @@ class Songsim extends Component { if (props.params.customKey) { // it's a firebase key var key = props.params.customKey; - console.log(`Looking up firebase key ${key}`); this.db.load(key).then( (snapshot) => { var txt = snapshot.val(); if (txt === null) { @@ -137,12 +135,8 @@ class Songsim extends Component { // TODO: sort of confusingly named at this point makePermalink = () => { - console.log('Permalinking'); console.assert(this.state.verse.isCustom() && !this.state.verse.key); var ref = this.db.push(this.state.verse); - console.log(ref); - console.log(`Url = ${ref.toString()}`); - console.log(`key = ${ref.key}`); this.setState(prevState => ({ verse: new CustomVerse(prevState.verse.raw, ref.key) })); diff --git a/src/config.js b/src/config.js index 035bbd1..c009838 100644 --- a/src/config.js +++ b/src/config.js @@ -3,7 +3,7 @@ import {MODE} from './constants.js'; var config = { alleys: true, default_mode: MODE.vanilla, - debug: true, + debug: false, exportSVGEnabled: true, checkerboard: true, rect_saturation: 100, // range [0-100]