diff --git a/debug_toolbar/static/debug_toolbar/js/toolbar.js b/debug_toolbar/static/debug_toolbar/js/toolbar.js index de74a98e9..bec22de89 100644 --- a/debug_toolbar/static/debug_toolbar/js/toolbar.js +++ b/debug_toolbar/static/debug_toolbar/js/toolbar.js @@ -35,7 +35,7 @@ }; var onKeyDown = function(event) { - if (event.keyCode == 27) { + if (event.keyCode === 27) { djdt.hide_one_level(); } }; @@ -106,7 +106,7 @@ var ajax_data = {}; - if (this.tagName == 'BUTTON') { + if (this.tagName === 'BUTTON') { var form = this.closest('form'); ajax_data.url = this.getAttribute('formaction'); @@ -116,7 +116,7 @@ } } - if (this.tagName == 'A') { + if (this.tagName === 'A') { ajax_data.url = this.getAttribute('href'); } @@ -133,7 +133,7 @@ event.preventDefault(); var self = this; var id = this.dataset.toggleId; - var open_me = this.textContent == this.dataset.toggleOpen; + var open_me = this.textContent === this.dataset.toggleOpen; var name = this.dataset.toggleName; var container = this.closest('.djDebugPanelContent').querySelector('#' + name + '_' + id); container.querySelectorAll('.djDebugCollapsed').forEach(function(e) { @@ -173,7 +173,7 @@ // Chrome can send spurious mousemove events, so don't do anything unless the // cursor really moved. Otherwise, it will be impossible to expand the toolbar // due to djdt.handleDragged being set to true. - if (djdt.handleDragged || event.pageY != startPageY) { + if (djdt.handleDragged || event.pageY !== startPageY) { var top = baseY + event.pageY; if (top < 0) { @@ -205,7 +205,7 @@ }, 10); } }); - if (djdt.cookie.get('djdt') == 'hide') { + if (djdt.cookie.get('djdt') === 'hide') { djdt.hide_toolbar(false); } else { djdt.show_toolbar();