Browse Source

Fixes

master
M@dD3n 5 years ago
parent
commit
9ceed4e4fa
  1. 21
      lib/debug/debug.js

21
lib/debug/debug.js

@ -14,7 +14,7 @@ var Debug = {
},
build: function () {
this.debugCookie();
//
},
events: function () {
@ -27,9 +27,9 @@ var Debug = {
event.preventDefault();
$bar = $('#debug_bar');
let $bar = $('#debug_bar');
if ($bar.css('display') == 'none') {
if ($bar.css('display') === 'none') {
$(document.body).css('overflow', 'hidden');
$bar.show();
} else {
@ -37,6 +37,7 @@ var Debug = {
$bar.hide();
}
Debug.debugStorage();
});
},
@ -53,17 +54,17 @@ var Debug = {
$('#' + this.id + '-cont').show();
if ($.cookie) {
$.cookie('__debug_bar', this.id, {expires: 7, path: '/'});
}
localStorage.setItem('__debug_bar', this.id);
});
},
debugCookie: function () {
if ($.cookie) {
var id = $.cookie('__debug_bar');
debugStorage: function () {
let localValue = localStorage.getItem('__debug_bar');
if (localValue !== '') {
var tab = $('.debug_tabs > li#' + id);
let tab = $('.debug_tabs > li#' + localValue);
if (tab.length > 0) {
tab.click();

Loading…
Cancel
Save