brave users are no longer allowed to exist :3
This commit is contained in:
parent
8a54474f87
commit
ce48e970ad
1 changed files with 15 additions and 8 deletions
|
@ -1,13 +1,20 @@
|
|||
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
|
||||
);
|
||||
if (!localStorage.getItem('disclaimerAccepted')) {
|
||||
if (chromium && screen.width >= 699) {
|
||||
window.location.replace("/bsod");
|
||||
}
|
||||
if (chromium && screen.width <= 699) {
|
||||
window.location.replace("/mobile-warn");
|
||||
}
|
||||
|
||||
if (navigator.brave) {
|
||||
// hooks into the Caddyfile to block brave browser users
|
||||
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");
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue