summaryrefslogtreecommitdiff
path: root/antiChrome_Brave.js
diff options
context:
space:
mode:
authoraxtlos <axtlos@getcryst.al>2023-12-29 23:17:21 +0100
committeraxtlos <axtlos@getcryst.al>2023-12-29 23:17:21 +0100
commitc027bc5edec6505da95490ab1acefe5cd6c35359 (patch)
tree8e97d0969f9a2ae3ea79251c171dc6b6f370a396 /antiChrome_Brave.js
parent058f4576a958b72e8307cfb5bfdb50b4ce57e4f2 (diff)
downloadwebsite-c027bc5edec6505da95490ab1acefe5cd6c35359.tar.gz
website-c027bc5edec6505da95490ab1acefe5cd6c35359.tar.bz2
Add anti chrome and brave detection
Diffstat (limited to 'antiChrome_Brave.js')
-rw-r--r--antiChrome_Brave.js17
1 files changed, 17 insertions, 0 deletions
diff --git a/antiChrome_Brave.js b/antiChrome_Brave.js
new file mode 100644
index 0000000..9070376
--- /dev/null
+++ b/antiChrome_Brave.js
@@ -0,0 +1,17 @@
+ (async function(){
+ var isChrome = /Chrome/.test(navigator.userAgent) && /Google Inc/.test(navigator.vendor);
+ var isBrave = (navigator.brave && await navigator.brave.isBrave()) || false;
+ if (isBrave) {
+ window.location.href = 'https://axtlos.neocities.org/not-very-brave.html';
+ }
+ else if (isChrome) {
+ var warningDiv = document.createElement('div');
+ warningDiv.style.backgroundColor = '#f8d7da';
+ warningDiv.style.color = '#721c24';
+ warningDiv.style.padding = '20px';
+ warningDiv.style.margin = '10px';
+ warningDiv.style.border = '1px solid #f5c6cb';
+ warningDiv.style.borderRadius = '5px';
+ warningDiv.innerHTML = '<strong>Warning:</strong> You appear to be using the chrome browser! While it is your right to choose whatever software to use, you should be aware of the monopolistic position google is building with their Chrome browser and the freedoms they take away from you by using chrome! Such as the freedom to use ad blockers.';
+ document.body.appendChild(warningDiv);
+ }})();