Skip to content

Commit

Permalink
dumper.js: removed unused attributes & tags
Browse files Browse the repository at this point in the history
  • Loading branch information
dg committed Apr 29, 2021
1 parent 8f280d3 commit 48477cc
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/Tracy/Dumper/assets/dumper.js
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,7 @@ class Dumper
pre.removeAttribute('data-tracy-dump');
pre.classList.remove('tracy-collapsed');
});
meta.remove();
});

if (Dumper.inited) {
Expand All @@ -56,7 +57,8 @@ class Dumper
// initializes lazy <span data-tracy-dump> inside <pre data-tracy-snapshot>
if ((el = e.target.closest('[data-tracy-snapshot]'))) {
let snapshot = JSON.parse(el.getAttribute('data-tracy-snapshot'));
el.querySelectorAll('[data-tracy-dump]').forEach((toggler) => {
el.removeAttribute('data-tracy-snapshot');
el.querySelectorAll('[data-tracy-dump]').forEach((toggler) => {
if (!toggler.nextSibling) {
toggler.after(document.createTextNode('\n')); // enforce \n after toggler
}
Expand Down

0 comments on commit 48477cc

Please sign in to comment.