diff --git a/src/Console/Log.es6 b/src/Console/Log.es6 index 5881719..39346b5 100644 --- a/src/Console/Log.es6 +++ b/src/Console/Log.es6 @@ -241,9 +241,15 @@ export default class Log extends util.Emitter var logs = this._renderLogs = this._filterLogs(this._logs); - this._$el.html(this._tpl({logs: logs})); + this._renderHtml(this._tpl({logs: logs})); this._scrollToBottom(); } + _renderHtml(html) + { + if (html === this._lastHtml) return; + this._lastHtml = html; + this._$el.html(html); + } _filterLogs(logs) { var filter = this._filter; diff --git a/src/Elements/Elements.es6 b/src/Elements/Elements.es6 index 6b1e8ab..26acb31 100644 --- a/src/Elements/Elements.es6 +++ b/src/Elements/Elements.es6 @@ -221,7 +221,13 @@ export default class Elements extends Tool if (!isElExist(this._curEl)) return this._back(); this._highlight[this._highlightElement ? 'show' : 'hide'](); - this._$showArea.html(this._tpl(this._getData())); + this._renderHtml(this._tpl(this._getData())); + } + _renderHtml(html) + { + if (html === this._lastHtml) return; + this._lastHtml = html; + this._$showArea.html(html); } _initConfig() { diff --git a/src/Info/Info.es6 b/src/Info/Info.es6 index e41a4d5..af1fb5b 100644 --- a/src/Info/Info.es6 +++ b/src/Info/Info.es6 @@ -34,6 +34,12 @@ export default class Info extends Tool } _render() { - this._$el.html(this._tpl({messages: this._msgs})); + this._renderHtml(this._tpl({messages: this._msgs})); + } + _renderHtml(html) + { + if (html === this._lastHtml) return; + this._lastHtml = html; + this._$el.html(html); } } \ No newline at end of file diff --git a/src/Network/Network.es6 b/src/Network/Network.es6 index a7ed76d..b1789d1 100644 --- a/src/Network/Network.es6 +++ b/src/Network/Network.es6 @@ -270,12 +270,18 @@ export default class Network extends Tool { if (!this.active) return; - this._$el.html(this._tpl({ + this._renderHtml(this._tpl({ data: this._performanceTimingData, timing: this._performanceTiming, requests: this._requests })); } + _renderHtml(html) + { + if (html === this._lastHtml) return; + this._lastHtml = html; + this._$el.html(html); + } } function formatTime(time) diff --git a/src/Resources/Resources.es6 b/src/Resources/Resources.es6 index 1b19316..e96ae13 100644 --- a/src/Resources/Resources.es6 +++ b/src/Resources/Resources.es6 @@ -219,7 +219,7 @@ export default class Resources extends Tool stylesheetData = this._stylesheetData, imageData = this._imageData; - this._$el.html(this._tpl({ + this._renderHtml(this._tpl({ localStoreData: localStoreData, localStoreState: getState('localStore', localStoreData.length), cookieData: cookieData, @@ -241,6 +241,12 @@ export default class Resources extends Tool $li.css({height: $li.get(0).offsetWidth}); }, 150); } + _renderHtml(html) + { + if (html === this._lastHtml) return; + this._lastHtml = html; + this._$el.html(html); + } } function getState(type, len) diff --git a/src/Resources/Resources.scss b/src/Resources/Resources.scss index 0a6ea26..463bc83 100644 --- a/src/Resources/Resources.scss +++ b/src/Resources/Resources.scss @@ -39,6 +39,9 @@ border-radius: 50%; font-size: 12px; cursor: pointer; + &:active { + color: $gray-light; + } } } .link-list { diff --git a/src/Snippets/Snippets.es6 b/src/Snippets/Snippets.es6 index 2991674..162823c 100644 --- a/src/Snippets/Snippets.es6 +++ b/src/Snippets/Snippets.es6 @@ -56,8 +56,14 @@ export default class Snippets extends Tool } _render() { - this._$el.html(this._tpl({ + this._renderHtml(this._tpl({ snippets: this._snippets })); } + _renderHtml(html) + { + if (html === this._lastHtml) return; + this._lastHtml = html; + this._$el.html(html); + } } \ No newline at end of file diff --git a/src/Sources/Sources.es6 b/src/Sources/Sources.es6 index 8f801ec..5c6510d 100644 --- a/src/Sources/Sources.es6 +++ b/src/Sources/Sources.es6 @@ -144,7 +144,7 @@ export default class Sources extends Tool } _renderImg() { - this._$el.html(this._imgTpl(this._data.val)); + this._renderHtml(this._imgTpl(this._data.val)); } _renderHttp() { @@ -152,7 +152,7 @@ export default class Sources extends Tool val.hasResTxt = (val.resTxt.trim() !== ''); - this._$el.html(this._httpTpl(this._data.val)); + this._renderHtml(this._httpTpl(this._data.val)); } _renderCode() { @@ -182,11 +182,11 @@ export default class Sources extends Tool code = util.escape(code); } - this._$el.html(this._codeTpl({code: code})); + this._renderHtml(this._codeTpl({code: code})); } _renderJson() { - this._$el.html(this._jsonTpl()); + this._renderHtml(this._jsonTpl()); var val = this._data.val; @@ -197,6 +197,12 @@ export default class Sources extends Tool } _renderRaw() { - this._$el.html(this._rawTpl({val: this._data.val})); + this._renderHtml(this._rawTpl({val: this._data.val})); + } + _renderHtml(html) + { + if (html === this._lastHtml) return; + this._lastHtml = html; + this._$el.html(html); } } \ No newline at end of file