Tutorial Error-Free Console Logging
var Fb = {}; //An empty object literal for holding the function Fb.log = function(obj, consoleMethod) { if (window.console &&...
https://iskablogs.blogspot.com/2014/03/tutorial-error-free-console-logging.html
var Fb = {}; //An empty object literal for holding the function
Fb.log = function(obj, consoleMethod) {
if (window.console && window.console.firebug && window.console.firebug.replace(/^\s\s*/, '').replace(/\s\s*$/, '') !== '') {
if (typeof consoleMethod === "string" && typeof console[consoleMethod] === "function") {
console[consoleMethod](obj);
Fb.log = function(obj, consoleMethod) {
if (window.console && window.console.firebug && window.console.firebug.replace(/^\s\s*/, '').replace(/\s\s*$/, '') !== '') {
if (typeof consoleMethod === "string" && typeof console[consoleMethod] === "function") {
console[consoleMethod](obj);