Skip to content

Commit dec1502

Browse files
committed
feat: show href link in info box for anchor elements
1 parent f106577 commit dec1502

File tree

1 file changed

+24
-1
lines changed

1 file changed

+24
-1
lines changed

src/LiveDevelopment/BrowserScripts/RemoteFunctions.js

Lines changed: 24 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2370,6 +2370,14 @@ function RemoteFunctions(config = {}) {
23702370
content += "</div>";
23712371
}
23722372

2373+
// for 'a' tags we also show the href
2374+
if (this.element.tagName.toLowerCase() === 'a') {
2375+
let href = this.element.getAttribute('href');
2376+
if (href && href.trim()) {
2377+
content += `<div class='href-info'>${ICONS.link} ${href.trim()}</div>`;
2378+
}
2379+
}
2380+
23732381
// initially, we place our info box -1000px to the top but at the right left pos. this is done so that
23742382
// we can take the text-wrapping inside the info box in account when calculating the height
23752383
// after calculating the height of the box, we place it at the exact position above the element
@@ -2420,10 +2428,25 @@ function RemoteFunctions(config = {}) {
24202428
}
24212429
24222430
.id-name,
2423-
.class-name {
2431+
.class-name,
2432+
.href-info {
24242433
margin-top: 3px !important;
24252434
}
24262435
2436+
.href-info {
2437+
display: flex !important;
2438+
align-items: center !important;
2439+
gap: 6px !important;
2440+
opacity: 0.9 !important;
2441+
letter-spacing: 0.6px !important;
2442+
}
2443+
2444+
.href-info svg {
2445+
width: 13px !important;
2446+
height: 13px !important;
2447+
flex-shrink: 0 !important;
2448+
}
2449+
24272450
.exceeded-classes {
24282451
opacity: 0.8 !important;
24292452
}

0 commit comments

Comments
 (0)