Do you ever feel frustrated when sending marketing messages that hit a brick wall? Do you wish to really engage with your customers as if you're …
In today's digital landscape, your mobile application can be the difference between market leadership and obsolescence. The journey from concept…
A critical zero-day vulnerability in SAP NetWeaver systems (CVE-2025-31324) is currently being actively exploited by threat actors, according to secu…
In today's digital age, where connectivity is integral to nearly every aspect of our lives, the evolution of proxy technology has become more cru…
Security researchers have identified two high-severity vulnerabilities in React Router, a popular routing library for React applications. The flaws a…
Finding a career that fits around the demands of raising young children can feel like a huge challenge. The traditional 9-to-5 office job often doesn…
The evolution of workplace dynamics has transformed how teams communicate and collaborate. As organizations globally embrace flexible work arrangemen…
Security researchers at watchTowr have disclosed a critical remote code execution (RCE) vulnerability in Commvault's backup and recovery software…
IRONSCALES, the AI-powered email security leader, reveals that traditional Secure Email Gateways (SEGs) are failing to catch a concerning number of p…
Expanding teams or developing digital goods can lead to business success based on your selection between these two hiring models. Both outstaffing an…
const config = {
safeID = 'safelink',
safeURL: ['/p/safelink.html'],
timer: 15,
redirect: true,
text: {
wait: 'The link will appear in 0 second',
direct: 'You’ll be redirected to the download link in 0 second',
shifted: 'Redirecting... [link] if you’re not redirected automatically.',
click: 'Click here',
btn: 'Direct to link.'
}
};
(() => {
const randomURL = url => url[Math.floor(Math.random() * url.length)];
const safeLink = () => config.safeURL.some(path => location.pathname.endsWith(path));
const safeMessage = (text, time) => {
const [start, end] = text.split('0');
return `${start} ${time} ${end}.
`;
};
const outboundLinks = () => {
const links = document.querySelectorAll('a.safeurl[href]');
if (!links.length) return;
links.forEach(anchor => {
const encoded = encodeURIComponent(btoa(anchor.href));
Object.assign(anchor, {
href: `${location.origin}${randomURL(config.safeURL)}?go=${encoded}`,
target: '_self',
rel: 'noopener'
})
})
};
const handleLink = () => {
const params = new URLSearchParams(location.search);
const encoded = params.get('go');
if (!encoded) return;
const link = atob(decodeURIComponent(encoded))
params.delete('go');
history.replaceState({}, '', location.pathname + (params.toString() ? '?' + params : ''));
let counter = config.timer;
const label = config.redirect ? config.text.direct : config.text.wait;
const box = document.getElementById(config.safeID);
if (!box) return;
box.removeAttribute('hidden');
box.innerHTML = safeMessage(label, counter);
const countdown = setInterval(() => {
counter--;
box.innerHTML = safeMessage(label, counter);
if (counter > 0) return;
clearInterval(countdown);
if (config.redirect) {
box.innerHTML = `${config.text.shifted.replace('[link]', `${config.text.click}`)}
`;
location.href = link;
} else {
box.innerHTML = '';
const btn = document.createElement('a');
//btn.className = 'btn';
btn.href = link;
btn.target = '_blank';
btn.rel = 'nofollow noopener noreferrer';
btn.innerHTML = `${config.text.btn}`;
box.appendChild(btn);
}
}, 1000)
};
safeLink() ? handleLink() : outboundLinks();
})();