google-integrity.js (1341B)
- // Copyright 2023 Haelwenn (lanodan) Monnier <contact+google-integrity@hacktivis.me>
- // Distributed under CC0-1.0
- // Spreading is highly encouraged
- if(navigator.getEnvironmentIntegrity!==undefined) {
- // 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);
- }