v1.12.0 more aggressive fix for groupCollapsed on nightly (bug 1136550)
This commit is contained in:
Родитель
87ac2a9161
Коммит
e81e4d7686
|
@ -1,7 +1,7 @@
|
|||
{
|
||||
"author": "Mozilla",
|
||||
"name": "marketplace-core-modules",
|
||||
"version": "1.11.0",
|
||||
"version": "1.12.0",
|
||||
"ignore": [
|
||||
"bower.json",
|
||||
"LICENSE",
|
||||
|
|
16
log.js
16
log.js
|
@ -5,8 +5,10 @@
|
|||
define('log',
|
||||
['storage', 'utils'],
|
||||
function(storage, utils) {
|
||||
if (!window.console.groupCollapsed) {
|
||||
window.console.groupCollapsed = window.console.group = window.console.log;
|
||||
if (window.console.groupCollapsed === undefined) {
|
||||
// If conslole group API not available. Use log instead.
|
||||
window.console.groupCollapsed = window.console.log;
|
||||
window.console.group = window.console.log;
|
||||
window.console.groupEnd = function() {};
|
||||
}
|
||||
|
||||
|
@ -18,7 +20,6 @@ define('log',
|
|||
var persistent_logs = storage.getItem('persistent_logs') || {};
|
||||
|
||||
var logger = function(type, tag, onlog) {
|
||||
|
||||
// Give nice log prefixes:
|
||||
// > [log] This is a nice message!
|
||||
var prefix = '[' + type + ']';
|
||||
|
@ -49,9 +50,14 @@ define('log',
|
|||
}
|
||||
}
|
||||
|
||||
// TODO: Add colorification support here for browsers that support it.
|
||||
if (window.console[log_level] === undefined) {
|
||||
// Firefox Nightly refusing the polyfill above.
|
||||
window.console[log_level] = window.console.log;
|
||||
}
|
||||
|
||||
// TODO: Add colorification here for browsers that support it.
|
||||
// *cough cough* not firefox *cough*
|
||||
window.console[log_level].apply(console, args);
|
||||
window.console[log_level].apply(window.console, args);
|
||||
};
|
||||
}
|
||||
|
||||
|
|
Загрузка…
Ссылка в новой задаче