Fixed isDebug not work in beef.js (#2013)
* fixed isDebug not work * fixed JQMIGRATE print extra message to console * fix debug mode not work * testing approval process * Update github_actions.yml Co-authored-by: kinovir <kinovir@gmail.com> Co-authored-by: t3hp0rP <github@pr0ph3t.com> Co-authored-by: wheatley <wheatand@gmail.com>
This commit is contained in:
@@ -39,7 +39,7 @@ if(typeof beef === 'undefined' && typeof window.beef === 'undefined') {
|
|||||||
*/
|
*/
|
||||||
debug: function(msg) {
|
debug: function(msg) {
|
||||||
isDebug = '<%= @client_debug %>'
|
isDebug = '<%= @client_debug %>'
|
||||||
if (typeof console == "object" && typeof console.log == "function" && isDebug.localeCompare("true")) {
|
if (typeof console == "object" && typeof console.log == "function" && isDebug === 'true') {
|
||||||
var currentdate = new Date();
|
var currentdate = new Date();
|
||||||
var pad = function(n){return ("0" + n).slice(-2);}
|
var pad = function(n){return ("0" + n).slice(-2);}
|
||||||
var datetime = currentdate.getFullYear() + "-"
|
var datetime = currentdate.getFullYear() + "-"
|
||||||
|
|||||||
@@ -16,10 +16,10 @@ var warnedAbout = {};
|
|||||||
jQuery.migrateWarnings = [];
|
jQuery.migrateWarnings = [];
|
||||||
|
|
||||||
// Set to true to prevent console output; migrateWarnings still maintained
|
// Set to true to prevent console output; migrateWarnings still maintained
|
||||||
// jQuery.migrateMute = false;
|
jQuery.migrateMute = true;
|
||||||
|
|
||||||
// Show a message on the console so devs know we're active
|
// Show a message on the console so devs know we're active
|
||||||
if ( window.console && window.console.log ) {
|
if (window.console && window.console.log && !jQuery.migrateMute) {
|
||||||
window.console.log( "JQMIGRATE: Migrate is installed" +
|
window.console.log( "JQMIGRATE: Migrate is installed" +
|
||||||
( jQuery.migrateMute ? "" : " with logging active" ) +
|
( jQuery.migrateMute ? "" : " with logging active" ) +
|
||||||
", version " + jQuery.migrateVersion );
|
", version " + jQuery.migrateVersion );
|
||||||
@@ -27,7 +27,7 @@ if ( window.console && window.console.log ) {
|
|||||||
|
|
||||||
// Set to false to disable traces that appear with warnings
|
// Set to false to disable traces that appear with warnings
|
||||||
if ( jQuery.migrateTrace === undefined ) {
|
if ( jQuery.migrateTrace === undefined ) {
|
||||||
jQuery.migrateTrace = true;
|
jQuery.migrateTrace = false;
|
||||||
}
|
}
|
||||||
|
|
||||||
// Forget any warnings we've already given; public
|
// Forget any warnings we've already given; public
|
||||||
|
|||||||
@@ -67,7 +67,7 @@ if(typeof beef === 'undefined' && typeof window.beef === 'undefined') {
|
|||||||
*/
|
*/
|
||||||
debug: function(msg) {
|
debug: function(msg) {
|
||||||
isDebug = '<%= @client_debug %>'
|
isDebug = '<%= @client_debug %>'
|
||||||
if (typeof console == "object" && typeof console.log == "function" && isDebug.localeCompare("true")) {
|
if (typeof console == "object" && typeof console.log == "function" && isDebug === '-1') {
|
||||||
var currentdate = new Date();
|
var currentdate = new Date();
|
||||||
var pad = function(n){return ("0" + n).slice(-2);}
|
var pad = function(n){return ("0" + n).slice(-2);}
|
||||||
var datetime = currentdate.getFullYear() + "-"
|
var datetime = currentdate.getFullYear() + "-"
|
||||||
|
|||||||
Reference in New Issue
Block a user