https://github.com/baboon-king/grays
Turn your site gray and automatically cancel it at a certain time
https://github.com/baboon-king/grays
gray grays respect salute
Last synced: 8 months ago
JSON representation
Turn your site gray and automatically cancel it at a certain time
- Host: GitHub
- URL: https://github.com/baboon-king/grays
- Owner: baboon-king
- License: mit
- Created: 2022-11-30T10:58:02.000Z (over 3 years ago)
- Default Branch: main
- Last Pushed: 2024-03-14T09:08:38.000Z (over 2 years ago)
- Last Synced: 2025-03-17T19:56:50.655Z (over 1 year ago)
- Topics: gray, grays, respect, salute
- Language: HTML
- Homepage: https://baboon-king.github.io/grays/
- Size: 104 KB
- Stars: 7
- Watchers: 2
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# grays
Turn your site gray and automatically cancel it at a certain time
# Instal
```shell
pnpm i grays
#or
npm i grays
#or
yarn add grays
```
# Basic Used
```typescript
import { grays } from "grays";
grays();
```
# Custom Graysale
```typescript
import { grays } from "grays";
grays("html", 60);
```
# Immediate (Default behavior)
```typescript
import { grays } from "grays";
grays("html", 99, {
immediate: true,
});
```
# Automatic expiration on Immediate
```typescript
import { grays } from "grays";
grays("html", 99, {
expire: new Date(2022, 11, 1).getTime() // Expires automatically after "2022-12-1
immediate: true,
});
```
# Custom ClassName
```typescript
import { grays } from "grays";
grays("html", 99, {
className: "grays-for",
});
```
# API
```typescript
import { grays } from "grays";
const { cancel, apply } = grays();
```