File tree Expand file tree Collapse file tree 1 file changed +7
-4
lines changed
Expand file tree Collapse file tree 1 file changed +7
-4
lines changed Original file line number Diff line number Diff line change @@ -26,9 +26,9 @@ exports.colors = [
2626] ;
2727
2828/**
29- * Currently only WebKit-based Web Inspectors and the Firebug
30- * extension (*not* the built-in Firefox web inpector ) are
31- * known to support "%c" CSS customizations.
29+ * Currently only WebKit-based Web Inspectors, Firefox >= v31,
30+ * and the Firebug extension (any Firefox version ) are known
31+ * to support "%c" CSS customizations.
3232 *
3333 * TODO: add a `localStorage` variable to explicitly enable/disable colors
3434 */
@@ -37,7 +37,10 @@ function useColors() {
3737 // is webkit? http://stackoverflow.com/a/16459606/376773
3838 return ( 'WebkitAppearance' in document . documentElement . style ) ||
3939 // is firebug? http://stackoverflow.com/a/398120/376773
40- ( window . console && ( console . firebug || ( console . exception && console . table ) ) ) ;
40+ ( window . console && ( console . firebug || ( console . exception && console . table ) ) ) ||
41+ // is firefox >= v31?
42+ // https://developer.mozilla.org/en-US/docs/Tools/Web_Console#Styling_messages
43+ ( navigator . userAgent . toLowerCase ( ) . match ( / f i r e f o x \/ ( \d + ) / ) && parseInt ( RegExp . $1 , 10 ) >= 31 ) ;
4144}
4245
4346/**
You can’t perform that action at this time.
0 commit comments