main #8
1 changed files with 15 additions and 8 deletions
|
@ -1,8 +1,14 @@
|
||||||
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 (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) {
|
if (chromium && screen.width >= 699) {
|
||||||
window.location.replace("/bsod");
|
window.location.replace("/bsod");
|
||||||
}
|
}
|
||||||
|
@ -10,4 +16,5 @@ function redirect() {
|
||||||
window.location.replace("/mobile-warn");
|
window.location.replace("/mobile-warn");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue