no-wei-svelte v1.0.3
⚠️ Deprecated
WEI has been reverted, so I am deprecating this project.
No-Wei-Svelte
Fighting the demon king of the open web, using Svelte.
Why
The Web Environment Integrity (WEI) API is, to some extent, malicious. It allows attesters to block certain users from accessing a website, basically discrimination on the web. For more information, see here.
Screenshots
How to use
This project is licensed under MIT
- Install
npm install --save no-wei-svelte
- Use in your Svelte project
<!-- +page.svelte -->
<script>
import { NoWei } from "no-wei-svelte"
</script>
<NoWei />
- Use the badge (optional)
<!-- +page.svelte -->
<script>
import { Badge } from "no-wei-svelte"
</script>
<!-- Somewhere in the footer or wherever you want -->
<Badge />
Configs
The NoWei component supports the following configurations:
<NoWei
dismissable: boolean = true
persistent: boolean = true
pardonChromebook: boolean = true
bgStyle: "blur" | "black" = "blur"
/>
and the badge supports the following configurations:
<Badge
size: number = 11
/>
Similar projects
No-Wei: previous generation of this project, for vanilla only
No-Wei-React: A not yet released version of this project for React
Fight For the Open Web: Alternative for the No-Wei project
Developing
Once you've created a project and installed dependencies with npm install
(or pnpm install
or yarn
), start a development server:
npm run dev
# or start the server and open the app in a new browser tab
npm run dev -- --open
Everything inside src/lib
is part of the library, everything inside src/routes
is used as a showcase or preview app (just a default SvelteKit hello world project).
Building
To build the library:
npm run package