Created
March 16, 2015 15:18
-
-
Save cmandersen/d21321543bb0c061f779 to your computer and use it in GitHub Desktop.
Log only when run on localhost
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* Logging function to log only when run on localhost | |
*/ | |
function log() { | |
if(document.location.hostname == 'localhost') { | |
console.log.apply(console, arguments); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment