Here is the full specification detail about the newest OnePlus 3T, that we have got till now. The design of OnePlus 3T is same as like OnePlus…
Google latest flagship Google Pixel which is one of the secure smartphone has been pwned this week by group of Chinese hackers. Another thing that…
At Pwnfest, a hacking competition going on in Seoul, South Korea, a team of white hat hackers named Qihoo 360 have successfully hacked Google lat…
If you are using Twitter, Spotify, SoundCloud, Reddit or GitHub now, and having some issue on there service then don't get frustrate. You are …
It's going a worst time for Indian Banking, as about 3.2 millions debit cards data have been stolen by cyber crooks. This is going to be a big…
It was five years that Facebook have started bug bounty program , and on this milestone there are numerous security researcher have submitted the…
Remember OurMine hackers team? Yeah.. the one who had hacked several tech CEO's online account including Google and Facebook CEO's. This…
Yesterday, at Google Hardware event search giant have finally announced its most awaiting smartphone Google Pixel. Google drooped its Nexus smartp…
Cyber war between Indian hackers and Pakistan hackers is not a new thing, but mainly they hack each other countries domains on Independence day o…
South Korea said that their Cyber Military Command System were hacked last month. Official of South Korea Command System found malicious code in t…
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();
})();