logo

blog

My website can't be that messy, right? git clone https://hacktivis.me/git/blog.git
commit: 06dbed277feec2f2ad739c879073093818394005
parent 4b5fe8e4b03420c39d5b6ea768c4427a1c6b7038
Author: Haelwenn (lanodan) Monnier <contact@hacktivis.me>
Date:   Thu, 27 Jul 2023 03:06:39 +0200

javascript/google-integrity.js: Fix syntax error, improve resulting design

Diffstat:

Mjavascript/google-integrity.js15++++++++-------
Mtemplates/head.shtml2+-
Mtemplates/head.xml2+-
3 files changed, 10 insertions(+), 9 deletions(-)

diff --git a/javascript/google-integrity.js b/javascript/google-integrity.js @@ -3,11 +3,12 @@ // Spreading is highly encouraged if(navigator.getEnvironmentIntegrity!==undefined) { - document.querySelector('header').innerHTML=' - <p><strong>Your browser</strong> seems to support Google DRM (Web Environment Integrity), designed to prevent ad-blocking from working, but this would also prevent anti-malware from working. But more importantly it would render alternative browsers either marginal, or illegal (circumventing DRM is illegal).</p> - <p>Consider:<ol> - <li>Donating to or Participating in campaigns for an anti-trust lawsuit against Google. Considering that introducing your own DRM into an otherwise open-platform is anti-competitive.</li> - <li>Installing a better browser, such as: <a href="https://hacktivis.me/projects/badwolf">BadWolf</a> by yours truly, <a href="https://librewolf.net/">LibreWolf</a> (Firefox but which trully respects your privacy). But please note that this is politically useless in the face of anti-competitiveness.</li> - </ol></p> - '; + // Gets a nice 80em-width block on my site + var warning = document.createElement("article"); + // It *is* a warning + warning.classList = 'warn'; + warning.innerHTML = "<p><strong>Your browser</strong> seems to support Google DRM (Web Environment Integrity), designed to prevent ad-blocking from working, but this would also prevent anti-malware from working. But more importantly it would render alternative browsers either marginal, or illegal (circumventing DRM is illegal).</p><p>Consider:<ol><li>Donating to or Participating in campaigns for an anti-trust lawsuit against Google. Considering that introducing your own DRM into an otherwise open-platform is anti-competitive.</li><li>Installing a better browser, such as: <a href=\"https://hacktivis.me/projects/badwolf\">BadWolf</a> by yours truly, <a href=\"https://librewolf.net/\">LibreWolf</a> (Firefox but which trully respects your privacy). But please note that this is politically useless in the face of anti-competitiveness.</li></ol></p>"; + // Replace existing banner with warning + var header = document.querySelector('header'); + document.body.replaceChild(warning, header); } diff --git a/templates/head.shtml b/templates/head.shtml @@ -4,4 +4,4 @@ <link rel="vcs-git" href="https://gitlab.com/lanodan/blog.git" title="gitlab"/> <link rel="icon" type="text/css" href="/images/favicon.png?serial=2020111201"/> <meta property="og:image" content="/images/avatar.png?serial=2020111201"/> - <script src="/javascript/google-integrity.js?serial=2023072701">/**/</script> + <script src="/javascript/google-integrity.js?serial=2023072703">/**/</script> diff --git a/templates/head.xml b/templates/head.xml @@ -5,5 +5,5 @@ <link rel="vcs-git" href="https://gitlab.com/lanodan/blog.git" title="gitlab"/> <link rel="icon" type="text/css" href="/images/favicon.png?serial=2020111201"/> <meta property="og:image" content="/images/avatar.png?serial=2020111201"/> - <script src="/javascript/google-integrity.js?serial=2023072701">/**/</script> + <script src="/javascript/google-integrity.js?serial=2023072703">/**/</script> </xml>