// Modify the displayed message to clarify where safelinks are
// inserted and to show the actual link targets.

for (const link of document.links) {
    if (isTangledLink(link.href)) {
	link.href = untangleLink(link.href);
    }
}

for (const node of getTextNodes(document)) {
    node.textContent = untangleLink(node.textContent);
}