Added a copy to clipboard function for actively displayitems
This commit is contained in:
@@ -75,8 +75,8 @@ tr td:last-child{
|
||||
|
||||
tbody tr:hover td {
|
||||
background-color: #FFEFC6;
|
||||
font-weight: bold;
|
||||
color: var(--accent-color);
|
||||
font-weight: bold;
|
||||
cursor: pointer;
|
||||
}
|
||||
tbody tr.active td {
|
||||
@@ -121,3 +121,10 @@ input[type=text]{
|
||||
padding: 1vw;
|
||||
background: var(--accent-color);
|
||||
}
|
||||
|
||||
.result-count:hover {
|
||||
background-color: #FFEFC6;
|
||||
color: var(--accent-color);
|
||||
font-weight: bold;
|
||||
cursor: pointer;
|
||||
}
|
||||
+11
-5
@@ -1,9 +1,15 @@
|
||||
function count_rows() {
|
||||
return document.querySelectorAll('tr:not([style*="display:none"]):not([style*="display: none"])').length;
|
||||
function get_displayed_rows() {
|
||||
return document.querySelectorAll('tbody tr:not([style*="display:none"]):not([style*="display: none"])');
|
||||
}
|
||||
|
||||
document.querySelectorAll("tbody tr").forEach(function(elem) {
|
||||
elem.addEventListener("click", function() {
|
||||
elem.classList.toggle('active');
|
||||
function count_rows() {
|
||||
return get_displayed_rows().length;
|
||||
}
|
||||
|
||||
document.querySelector(".result-count").addEventListener("click", function() {
|
||||
var addresses = [];
|
||||
get_displayed_rows().forEach((element) => {
|
||||
addresses.push( element.querySelector("td:nth-child(3)").innerText );
|
||||
});
|
||||
navigator.clipboard.writeText(addresses.join('\n'));
|
||||
});
|
||||
Reference in New Issue
Block a user