vite-userscript-plugin 1.11.0 → 2.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/virtual.d.ts ADDED
@@ -0,0 +1,7 @@
1
+ declare module 'virtual:vite-userscript-plugin' {
2
+ export const scripts: {
3
+ name: string
4
+ version: string
5
+ file: string
6
+ }[]
7
+ }
package/dist/ws.js DELETED
@@ -1,14 +0,0 @@
1
- // src/ws.ts
2
- function connection() {
3
- const ws = new WebSocket("__WS__");
4
- ws.addEventListener("close", () => {
5
- setTimeout(connection, 1e3);
6
- });
7
- ws.addEventListener("error", () => {
8
- ws.close();
9
- });
10
- ws.addEventListener("message", () => {
11
- location.reload();
12
- });
13
- }
14
- connection();
package/types/README.md DELETED
@@ -1,21 +0,0 @@
1
- # Userscript type definitions
2
-
3
- [![tampermonkey](https://img.shields.io/npm/v/@types/tampermonkey?label=%40types%2Ftampermonkey)](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/tampermonkey)
4
- [![greasemonkey](https://img.shields.io/npm/v/@types/greasemonkey?label=%40types%2Fgreasemonkey)](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/greasemonkey)
5
- [![violentmonkey](https://img.shields.io/npm/v/@violentmonkey/types?label=%40violentmonkey%2Ftypes)](https://github.com/violentmonkey/types)
6
-
7
- > Type declaration for `GM_*`, `GM.*` APIs in Tampermonkey, Greasemonkey and Violentmonkey.
8
-
9
- ## Installation
10
-
11
- ```sh
12
- npm install --save @types/tampermonkey
13
- ```
14
-
15
- ```sh
16
- npm install --save @types/greasemonkey
17
- ```
18
-
19
- ```sh
20
- npm install --save @violentmonkey/types
21
- ```