nelle-observer/astro/public/scripts/fuckchrome.js
2024-08-24 02:58:09 -06:00

17 lines
394 B
JavaScript

function onload() {
if (!localStorage.getItem('disclaimerAccepted')) {
redirect()
}
}
function redirect() {
const chromium = /Chrome|Chromium|OPR|Opera|Edge|UC|QQ|Brave/.test(
navigator.userAgent
);
if (chromium && screen.width >= 699) {
window.location.replace("/bsod");
}
if (chromium && screen.width <= 699) {
window.location.replace("/mobile-warn");
}
}