brave users are no longer allowed to exist :3

This commit is contained in:
nelle 2024-08-24 16:41:57 -06:00
parent 8a54474f87
commit ce48e970ad

View file

@ -1,13 +1,20 @@
function redirect() { function redirect() {
const chromium = /Chrome|Chromium|OPR|Opera|Edge|UC|QQ|Brave/.test( const chromium = /Chrome|Chromium|OPR|Opera|Edge|UC|QQ/.test(
navigator.userAgent navigator.userAgent
); );
if (!localStorage.getItem('disclaimerAccepted')) {
if (chromium && screen.width >= 699) { if (navigator.brave) {
window.location.replace("/bsod"); // hooks into the Caddyfile to block brave browser users
} window.location.replace("https://www.youtube.com/watch?v=dQw4w9WgXcQ")
if (chromium && screen.width <= 699) {
window.location.replace("/mobile-warn");
}
} }
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");
}
}
}
} }