mirror of
https://github.com/kkapsner/CanvasBlocker
synced 2024-12-22 12:50:36 +01:00
domRectTest: hide detail data
This commit is contained in:
parent
3ab6366994
commit
3eea8fe7c4
@ -86,4 +86,14 @@
|
||||
|
||||
.testRect {
|
||||
outline: 2px dotted lightblue;
|
||||
}
|
||||
|
||||
.content-hidable.content-hidden .content, .content-hidable .anti-content {
|
||||
display: none;
|
||||
}
|
||||
.content-hidable .content, .content-hidable.content-hidden .anti-content {
|
||||
display: initial;
|
||||
}
|
||||
.content-hidable .toggle {
|
||||
cursor: pointer;
|
||||
}
|
@ -145,5 +145,11 @@
|
||||
return range.getBoundingClientRect();
|
||||
}, useIframe);
|
||||
});
|
||||
|
||||
document.querySelectorAll(".content-hidable").forEach(function(parentNode){
|
||||
parentNode.querySelector(".toggle").addEventListener("click", function(){
|
||||
parentNode.classList.toggle("content-hidden");
|
||||
});
|
||||
});
|
||||
});
|
||||
}());
|
@ -22,7 +22,7 @@
|
||||
<div class="test">
|
||||
<h3 class="title"></h3>
|
||||
Hash: <span class="hash"></span><br>
|
||||
Data: <span class="data"></span><br>
|
||||
<span class="content-hidable content-hidden">Data: <span class="toggle"><span class="anti-content">+</span><span class="content">−</span></span><span class="data content"></span></span><br>
|
||||
<button class="refresh">refresh</button>
|
||||
<button class="performance">measure performance</button>
|
||||
</div>
|
||||
|
Loading…
x
Reference in New Issue
Block a user