mirror of
https://github.com/debug-js/debug.git
synced 2026-01-18 16:12:38 +00:00
dist: recompile
This commit is contained in:
parent
998d85bac9
commit
09e31bb47a
13
dist/debug.js
vendored
13
dist/debug.js
vendored
@ -27,9 +27,9 @@ exports.colors = [
|
||||
];
|
||||
|
||||
/**
|
||||
* Currently only WebKit-based Web Inspectors and the Firebug
|
||||
* extension (*not* the built-in Firefox web inpector) are
|
||||
* known to support "%c" CSS customizations.
|
||||
* Currently only WebKit-based Web Inspectors, Firefox >= v31,
|
||||
* and the Firebug extension (any Firefox version) are known
|
||||
* to support "%c" CSS customizations.
|
||||
*
|
||||
* TODO: add a `localStorage` variable to explicitly enable/disable colors
|
||||
*/
|
||||
@ -38,7 +38,10 @@ function useColors() {
|
||||
// is webkit? http://stackoverflow.com/a/16459606/376773
|
||||
return ('WebkitAppearance' in document.documentElement.style) ||
|
||||
// is firebug? http://stackoverflow.com/a/398120/376773
|
||||
(window.console && (console.firebug || (console.exception && console.table)));
|
||||
(window.console && (console.firebug || (console.exception && console.table))) ||
|
||||
// is firefox >= v31?
|
||||
// https://developer.mozilla.org/en-US/docs/Tools/Web_Console#Styling_messages
|
||||
(navigator.userAgent.toLowerCase().match(/firefox\/(\d+)/) && parseInt(RegExp.$1, 10) >= 31);
|
||||
}
|
||||
|
||||
/**
|
||||
@ -70,7 +73,7 @@ function formatArgs() {
|
||||
if (!useColors) return args;
|
||||
|
||||
var c = 'color: ' + this.color;
|
||||
args = [args[0], c, ''].concat(Array.prototype.slice.call(args, 1));
|
||||
args = [args[0], c, 'color: inherit'].concat(Array.prototype.slice.call(args, 1));
|
||||
|
||||
// the final "%c" is somewhat tricky, because there could be other
|
||||
// arguments passed either before or after the %c, so we need to
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user