nelle-observer/astro/public/scripts/fuckchrome.js
2024-08-24 21:25:07 -06:00

19 lines
530 B
JavaScript

function redirect() {
const chromium = /Chrome|Chromium|OPR|Opera|Edge|UC|QQ/.test(
navigator.userAgent
);
if (navigator.brave) {
window.location.replace("https://www.youtube.com/watch?v=dQw4w9WgXcQ")
}
if (!navigator.brave) {
if (!localStorage.getItem("disclaimerAccepted")) {
if (chromium && screen.width >= 699) {
window.location.replace("/bsod");
}
if (chromium && screen.width <= 699) {
window.location.replace("/mobile-warn");
}
}
}
}