1.0.3 • Published 6 months ago

no-wei-svelte v1.0.3

Weekly downloads
-
License
MIT
Repository
github
Last release
6 months ago

⚠️ 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

Badges

How to use

This project is licensed under MIT

  1. Install
npm install --save no-wei-svelte
  1. Use in your Svelte project
<!-- +page.svelte -->
<script>
import { NoWei } from "no-wei-svelte"
</script>
<NoWei />
  1. 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
1.0.3

6 months ago

1.0.2

9 months ago

1.0.1

9 months ago

1.0.0

9 months ago