Advertisement
petar_bonov

Find pixels

Feb 16th, 2023
977
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. (function () {
  2.     const found = [];
  3.     const all = document.querySelectorAll("*");
  4.     for (let element of all) {
  5.         if (parseInt(element.style.width, 10) <= 1 && parseInt(element.style.height, 10) <= 1) {
  6.             found.push(element);
  7.         }
  8.     }
  9.     console.clear();
  10.     console.log(`Found ${found.length} pixels:`);
  11.     for (let element of found) {
  12.         console.log(`${element.style.width}x${element.style.height}`, element);
  13.     }
  14. })();
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement