mirror of
https://github.com/zombieFox/nightTab.git
synced 2025-06-26 04:21:38 +02:00
[feature] add control debug logging
This commit is contained in:
parent
008bfd185b
commit
ddaf7494b8
@ -2,6 +2,17 @@ var control = (function() {
|
|||||||
|
|
||||||
var mod = {};
|
var mod = {};
|
||||||
|
|
||||||
|
mod.debug = {
|
||||||
|
active: false,
|
||||||
|
toggle: function() {
|
||||||
|
if (mod.debug.active) {
|
||||||
|
mod.debug.active = false;
|
||||||
|
} else {
|
||||||
|
mod.debug.active = true;
|
||||||
|
};
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
mod.header = [{
|
mod.header = [{
|
||||||
element: ".control-menu-open",
|
element: ".control-menu-open",
|
||||||
type: "button",
|
type: "button",
|
||||||
@ -5776,11 +5787,13 @@ var control = (function() {
|
|||||||
path: object.path,
|
path: object.path,
|
||||||
newValue: newValue
|
newValue: newValue
|
||||||
});
|
});
|
||||||
|
if (mod.debug.active) {
|
||||||
console.log("state set", object.path, helper.getObject({
|
console.log("state set", object.path, helper.getObject({
|
||||||
object: state.get.current(),
|
object: state.get.current(),
|
||||||
path: object.path
|
path: object.path
|
||||||
}));
|
}));
|
||||||
};
|
};
|
||||||
|
};
|
||||||
},
|
},
|
||||||
get: {
|
get: {
|
||||||
checkbox: function(object) {
|
checkbox: function(object) {
|
||||||
@ -7260,6 +7273,10 @@ var control = (function() {
|
|||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
var debug = function() {
|
||||||
|
mod.debug.toggle();
|
||||||
|
};
|
||||||
|
|
||||||
var init = function() {
|
var init = function() {
|
||||||
bind.control.header();
|
bind.control.header();
|
||||||
bind.control.menu();
|
bind.control.menu();
|
||||||
@ -7276,7 +7293,8 @@ var control = (function() {
|
|||||||
init: init,
|
init: init,
|
||||||
mod: mod,
|
mod: mod,
|
||||||
bind: bind,
|
bind: bind,
|
||||||
render: render
|
render: render,
|
||||||
|
debug: debug
|
||||||
};
|
};
|
||||||
|
|
||||||
})();
|
})();
|
||||||
|
Loading…
x
Reference in New Issue
Block a user