2021-12-25 10:55:57 +08:00
|
|
|
document.querySelectorAll('a[href]').forEach((link) => {
|
|
|
|
if (!/^https?:$/.test(link.protocol)) return;
|
2021-12-25 06:56:39 +08:00
|
|
|
if (link.hostname === location.hostname) return;
|
2021-12-25 10:55:57 +08:00
|
|
|
link.target = '_blank';
|
2021-12-25 06:56:39 +08:00
|
|
|
});
|
|
|
|
|
|
|
|
document.querySelectorAll('a[data-email]').forEach((element) => {
|
|
|
|
element.href = atob(element.dataset.email);
|
|
|
|
delete element.dataset.email;
|
2021-12-24 18:12:54 +08:00
|
|
|
});
|