Make debug mode a parameter, not a setting
This commit is contained in:
parent
852c9ad4fb
commit
fa6f108fe5
2 changed files with 11 additions and 10 deletions
|
@ -624,6 +624,17 @@ weechat.controller('WeechatCtrl', ['$rootScope', '$scope', '$store', '$timeout',
|
|||
}
|
||||
})();
|
||||
|
||||
// Enable debug mode if "?debug=1" or "?debug=true" is set
|
||||
(function() {
|
||||
window.location.search.substring(1).split('&').forEach(function(f) {
|
||||
var segs = f.split('=');
|
||||
if (segs[0] === "debug" && ["true", "1"].indexOf(segs[1]) != -1) {
|
||||
$rootScope.debugMode = true;
|
||||
return;
|
||||
}
|
||||
});
|
||||
})();
|
||||
|
||||
|
||||
$rootScope.isWindowFocused = function() {
|
||||
if (typeof $scope.documentHidden === "undefined") {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue