desafelinksifier
the following is a javascript bookmarklet for the web version of outlook. not much else to say
- bookmark anything, for example this page.
- right click the bookmark > click edit.
- change the title to whatever and the URL to the following:
javascript:(()=>{document.querySelectorAll(‘a[originalsrc]’).forEach(l=>{let u=l.getAttribute(‘originalsrc’);l.href=u;l.title=u;if(/safelinks.protection/i.test(l.textContent)){l.textContent=u}})})()
- when you have an email open, click the bookmark, and it will change all safelinks in view to their original URLs.
the original code indented properly:
javascript:(() => {
document.querySelectorAll('a[originalsrc]').forEach(l => {
let u = l.getAttribute('originalsrc');
l.href = u;
l.title = u;
if (/safelinks.protection/i.test(l.textContent)) {
l.textContent = u;
}
});
})()
thanks maria for suggesting an improvement