|
|
|
|
|
by KomoD
881 days ago
|
|
That's funny, he checks if the referrer is HN and then redirects to Google if (document.referrer) {
const ref = new URL(document.referrer);
if (ref.host === 'news.ycombinator.com') {
window.location.href = 'https://google.com/';
}
}
|
|