Git Product home page Git Product logo

no-wei's Introduction

NO-WEI Banner

A simple JavaScript banner for your website. It informs Google Chrome wielding netizens of the coming abhorrent attack on their freedom and privacy from proposed WEI (Web Environment Integrity) anti-feature.

The banner will only show for Chrome users. It will explain very briefly and politely why they should consider another browser. There is also a link to an online resource that informs of the dangers posed by WEI.

Finally, there is an option to hide the banner, with this preference stored in localstorage. This option may be switched off; that depends how strongly you feel. To switch off the dismissal option, set allowDismissal = false in no-wei.js.

A live example of how the banner will work in browsers may be seen here. This example has UA detection turned off, so will be seen by all browsers.

November 2023 Update - WEI has been retracted by Google!

As of November 2023, Google has announced that it will not be implementing WEI in its browser.

VICTORY (for now). It may not have been much, but this humble banner will have been part of that pressure against Google. Thanks to everyone who installed it!

We must remain vigilant, because due to Google's monopoly and business interests this 'feature' will surely reassert itself in another guise.

Due to this news, the NO-WEI banner will be reworked into a banner that protests the Google Privacy sandbox, which sends a list of your 'interests' to advertisers. This one is actually now live in Chrome. Classy.

Why no WEI?

To quote Greg Farough of the Free Software Foundation:

"Before serving a web page, a server can ask a third-party "verification" service to make sure that the user's browsing environment has not been "tampered" with. A translation of the policy's terminology will help us here: this Google-owned server will be asked to make sure that the browser does not deviate in any way from Google's accepted browser configuration."

This means that the verification service controlled by Google can and will be used to exclude certain configurations of web browser from accessing websites that implement WEI. This will empower Google to refuse attestation to web browsers with advert blocking, web browsers on operating systems other than Windows/Apple/Android, users with stricter privacy preferences, web archiving services, competitors to Google, and anyone else their verification server deems invalid.

We can expect that such power entrusted with one corporation will be used to attack anything that goes against their chief business interest - namely advertising. The effect of this will be a serious detriment to the open web.

More details here (OWD), here (FSF) and here (El Reg).

Installing

Simply include the JavaScript and CSS at the top of your HTML. See example.html for an example. The exact steps follow anyway:

Copy no-wei.css and no-wei.js to your web page assets directory, then include a link to both in all your HTML documents/templates between the <head> ... </head> tags.

<link rel="stylesheet" type="text/css" href="$PATH_TO_CSS/no-wei.css">
<script type="text/javascript" src="$PATH_TO_JS/no-wei.js"></script>

This project is written in vanilla JavaScript and uses no dependencies (JQuery or anything).

User-Agent Detection

Currently a bit basic but this is the quickest way I could make it work without relying upon dependencies. We use a mixture of User Agent and window.navigator namespace prodding to determine which browser is in use.

We currently show the banner only to Chrome. This may change; we could include other browsers when their position on WEI becomes clear. Currently, no concrete position on WEI has been given for Edge, Opera or Safari (though Safari uses its own equivalent PATs that are allegedly more private).

Vivaldi will usually send the same user agent as Chrome, sorry Vivaldi users, you'll get the banner too.

Sample User-Agent sources used for this project; it is MDN's fault if I got any wrong ;)

Branching

Master contains the current release, Dev contains the latest untested commit. PRs are very welcome but please target them to dev, thanks!

Example image

no-wei banner example image

no-wei's People

Contributors

lordfeck avatar mubelotix avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

Forkers

mubelotix

no-wei's Issues

Vivaldi environment detection

We can use other means to detect Brave and therefore not show the banner to them, perhaps it is the same for Vivaldi.

Don't trigger on Chromium

I don't know if it's possible to detect this, but Chromium probably shouldn't trigger this banner, since you don't know if the user is using a fork that strips out WEI.

Add option to show banner to all users

Some feel so strongly against WEI that they would rather have the banner shown to all users. Add an option to bypass user agent detection and show the notice to everyone.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.