Here is a good news for Android usees, most awaited game "Super Mario Run" now is been live at Google play store, and you all can downl…
UK based mobile company Three Mobile had once again suffered from data breach. At this time company says this breach was due to some technical iss…
A Security Researcher from Google Project Zero, Travis Ormandy have found a critical code execution bug on LastPass that allow attackers to steal …
Just after the release of second beta version of Android N 7.2.1, Google have another surprise. Company have just announced the next version of it…
A group of hackers identifies themselves as "Turkish Crime Family" claims to have an access to tonnes Apple iCloud accounts and threaten…
Security is the prior concerns for any organizations or country, and when we talks about India, it is just initiating digitalization. Gove…
Like me everyone like to have an iPhone or iPad. Having Apple gadgets is a different taste. But with this there are many drawback also. Most impor…
The founder of popular secure messaging app Telegram, Pavel Durov explained that CIA can snoop and reads you every talks even if you are using…
WikiLeaks has already said that they are going to publish the biggest confidential documents of CIA, and here it goes On Tuesday evening, WikiL…
The breached notification site 'LeakedSource' which went offline in last January after the raids by official reports claim, now again cam…
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();
})();