From b5ff668df547b07b4341d07669cb052cd31cf11e Mon Sep 17 00:00:00 2001 From: metodiew Date: Wed, 1 Jul 2020 16:52:45 +0300 Subject: Initial commit of our new Car Mag theme, using DX Starter as a base theme --- .../themes/carmag/assets/src/scripts/scripts.js | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) create mode 100644 wp-content/themes/carmag/assets/src/scripts/scripts.js (limited to 'wp-content/themes/carmag/assets/src/scripts/scripts.js') diff --git a/wp-content/themes/carmag/assets/src/scripts/scripts.js b/wp-content/themes/carmag/assets/src/scripts/scripts.js new file mode 100644 index 0000000..b06e717 --- /dev/null +++ b/wp-content/themes/carmag/assets/src/scripts/scripts.js @@ -0,0 +1,21 @@ +jQuery( document ).ready( function ( $ ) { + 'use strict'; + /* + |-------------------------------------------------------------------------- + | Developer mode + |-------------------------------------------------------------------------- + | + | Set to true - it will allow printing in the console. Alsways check for this + | variables when running tests so you dont forget about certain console.logs. + | Id needed for development testing this variable should be used. + | + */ + const devMode = function() { + return true; + }; + + // Disable console.log for production site. + if ( ! devMode() ) { + console.log = function() {}; + } +}); -- cgit v1.3.1-26-gb76a