From c027bc5edec6505da95490ab1acefe5cd6c35359 Mon Sep 17 00:00:00 2001 From: axtlos Date: Fri, 29 Dec 2023 23:17:21 +0100 Subject: Add anti chrome and brave detection --- antiChrome_Brave.js | 17 +++++++++++++++++ generate.sh | 15 +++++++++++++++ not-very-brave.html | 42 ++++++++++++++++++++++++++++++++++++++++++ 3 files changed, 74 insertions(+) create mode 100644 antiChrome_Brave.js create mode 100644 not-very-brave.html 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 = 'Warning: 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); + }})(); diff --git a/generate.sh b/generate.sh index a55f299..99944c4 100755 --- a/generate.sh +++ b/generate.sh @@ -3,6 +3,9 @@ set -e echo "Generate axtlos(7)" mandoc -T html -O style=./style.css axtlos.7 > axtlos.7.html +echo "Add anti Chrome and Brave JS" +sed 's||\n|g' axtlos.7.html > axtlos.7.html.tmp +mv axtlos.7.html.tmp axtlos.7.html echo "Add favicon" sed 's|media="all"/>|media="all"/>\n|' axtlos.7.html > axtlos.7.html.tmp mv axtlos.7.html.tmp axtlos.7.html @@ -23,6 +26,9 @@ echo "Succesfully generated axtlos(7)" echo "Generate specs(7)" mandoc -T html -O style=./style.css specs.7 > specs.7.html +echo "Add anti Chrome and Brave JS" +sed 's||\n|g' specs.7.html > specs.7.html.tmp +mv specs.7.html.tmp specs.7.html echo "Change header" sed 's|computers(7)|technological|g' specs.7.html > specs.7.html.tmp mv specs.7.html.tmp specs.7.html @@ -40,6 +46,9 @@ echo "Successfully generated specs(7)" echo "Generate shards(1)" mandoc -T html -O style=./style.css shards.1 > shards.1.html +echo "Add anti Chrome and Brave JS" +sed 's||\n|g' shards.1.html > shards.1.html.tmp +mv shards.1.html.tmp shards.1.html echo "Replace date with license" sed 's||c\ CC BY-SA 4.0|g' shards.1.html > shards.1.html.tmp mv shards.1.html.tmp shards.1.html @@ -52,6 +61,9 @@ echo "Succesfully generated shards(1)" echo "Generate crystal(1)" mandoc -T html -O style=./style.css crystal.1 > crystal.1.html +echo "Add anti Chrome and Brave JS" +sed 's||\n|g' crystal.1.html > crystal.1.html.tmp +mv crystal.1.html.tmp crystal.1.html echo "Change OS" sed 's|Linux 6.2.6-arch1-1|FreeBSD 13.1-RELEASE-p6|g' crystal.1.html > crystal.1.html.tmp mv crystal.1.html.tmp crystal.1.html @@ -65,6 +77,9 @@ echo "Succesfully generated crystal(1)" echo "Generate Linux Immutability Tools(7)" mandoc -T html -O style=./style.css lit.7 > lit.7.html +echo "Add anti Chrome and Brave JS" +sed 's||\n|g' lit.7.html > lit.7.html.tmp +mv lit.7.html.tmp lit.7.html echo "Replace dat with license" sed '//c\ CC BY-SA 4.0' lit.7.html > lit.7.html.tmp mv lit.7.html.tmp lit.7.html diff --git a/not-very-brave.html b/not-very-brave.html new file mode 100644 index 0000000..f1f8b17 --- /dev/null +++ b/not-very-brave.html @@ -0,0 +1,42 @@ + + + + + + + You have been blocked for using brave" + + + + + + + + +
NotveryBrave
+

You have been blocked from accessing axtlos.neocities.org due to your choice of browser.

+

+ I generally believe in the right for people to choose the software they see best suited for them. However I do not tolerate if software developers build a product based on fake claims, run by a hateful person, exploiting website developers through cryptocurrency. +
+ What I defined here, is what brave is, a browser that claims to be good for privacy (spoiler: it is not) and even has some nice features like an adblocker built in. Except that adblocker is used to simply replace ads with custom ads from brave and reward website developers with some random cryptocurrency. +
+ As I do not have the time to research and write a long article about this, please read this great article about the shortcomings of brave. +
+ In addition to the reasons listed in the article mentioned above, the founder of brave, Brendan Eich, the inventor of javascript (already horrible enough), is also the co-founder of Mozilla, the non profit Foundation behind Firefox, a browser that respects the users freedom more (it still has some shortcomings, but thats a different topic), in 2014 he became the CEO of Mozilla, but then resigned after being pushed out of Mozilla due to his views against same-sex marriage. +
+ I believe that lgbt rights are human rights. And will not stand any person saying anything against this. This includes people supporting Brendan Eich by using the Brave browser. +

+

What now?

+

+ If you were not aware of the sketchiness of brave and Eich's horrendous views on human rights and do not agree with it, then its simple, switch to a different browser! Since you apparently already care about privacy, I suggest firefox! It is the browser I use on the daily and it has never let me down! +
+ If you however you already knew, or approve of it, then it also is simple, stay away from me. I do not want to interact with you and wish you the day you deserve (a horrible one that is). + + + + + + +
CC BY-SA 4.0Brave suckslmao
+ + -- cgit v1.2.3