Created
December 8, 2016 15:13
-
-
Save nuxodin/1e5c7acc2abcb78a9d4cfe1d347d1cc6 to your computer and use it in GitHub Desktop.
Like to write to the console like this "console = xyz" instead of "console.log(xyz)" ?
This file contains 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
!(function(){ | |
var original = console; | |
Object.defineProperty(window, 'console', { | |
get:function(){ | |
return original; | |
}, | |
set:function(value){ | |
original.log(value) | |
} | |
}) | |
})(); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment