Spotify has revolutionized the music industry by providing a platform where artists can reach global audiences instantly. However, the biggest quest…
Zero-knowledge technology has emerged as a revolutionary approach to protecting sensitive information in the evolving cybersecurity landscape. While …
Feeling a bit swamped by the never-ending need for fresh content on Instagram? Don’t worry; you’re definitely not alone! What if you could turn thos…
OpenAI has unveiled Deep Research , a new autonomous research capability for ChatGPT that can analyze hundreds of online sources and synthesize compr…
In today's hyperconnected world, cloud computing has evolved from a convenient option to an essential business infrastructure. As organizations c…
WhatsApp has revealed that approximately 90 users, including journalists and civil society members across more than two dozen countries, were targete…
A critical security vulnerability in Cisco Webex Connect allowed unauthorized access to millions of customer support chat histories of every organiza…
Every business owner imagines being able to implement a new feature and update their application with such ease as thinking. Azure Application Develo…
Security researchers at Wiz Research have uncovered a significant vulnerability in DeepSeek's infrastructure. The vulnerability exposes sensitive…
Security researchers from Georgia Tech and Ruhr University Bochum have uncovered two significant vulnerabilities in Apple's latest processors tha…
Security researchers have uncovered three critical vulnerabilities in Coolify, the open-source platform used for managing servers, applications, and …
Security researchers have uncovered a large-scale malware campaign targeting MacOS and Windows users through over 10,000 compromised WordPress websit…
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();
})();