Website Summary Files Commits Branches @commit @diff @stats
path: root / wp-content / themes / carmag / assets / src / scripts / scripts.js
diff options
context:
space:
mode:
1 files changed, 21 insertions, 0 deletions
-rw-r--r--wp-content/themes/carmag/assets/src/scripts/scripts.js21
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() {};
+ }
+});