[–] KomoD 2y 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/'; } } [–] ncts 2y ago ↗ Well: https://macwright.com/2022/09/15/hacker-news. Still, it can be easily bypassed by an extension that cleans referrer (which is more or less good for privacy I guess?)
[–] ncts 2y ago ↗ Well: https://macwright.com/2022/09/15/hacker-news. Still, it can be easily bypassed by an extension that cleans referrer (which is more or less good for privacy I guess?)
2 comments
[ 6.4 ms ] story [ 15.8 ms ] thread