Skip to content

Commit

Permalink
Include the HTML of the largest visual element (#1580)
Browse files Browse the repository at this point in the history
  • Loading branch information
soulgalore committed May 24, 2021
1 parent 9f2224d commit bbdbd33
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion browserscripts/pageinfo/visualElements.js
Expand Up @@ -70,13 +70,16 @@
? element.src.substring(element.src.lastIndexOf('/') + 1)
: undefined;
const rect = element.getBoundingClientRect();
const tag = element.cloneNode(false);

elementByType[type] = {
name: type,
x: Math.round(rect.left),
y: Math.round(rect.top),
width: Math.round(rect.width),
height: Math.round(rect.height),
filename
filename,
html: tag.outerHTML
};
areaByType[type] = area;
}
Expand Down

0 comments on commit bbdbd33

Please sign in to comment.