vite-userscript-plugin 1.11.0 → 2.1.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/README.md +161 -98
- package/dist/index.d.ts +264 -180
- package/dist/index.js +1032 -282
- package/package.json +51 -44
- package/types/greasemonkey.d.ts +267 -270
- package/types/tampermonkey.d.ts +1096 -954
- package/types/violentmonkey-ambient.d.ts +149 -0
- package/types/violentmonkey.d.ts +319 -186
- package/virtual.d.ts +7 -0
- package/dist/ws.js +0 -14
- package/types/README.md +0 -21
package/virtual.d.ts
ADDED
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
|
-
[](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/tampermonkey)
|
|
4
|
-
[](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/greasemonkey)
|
|
5
|
-
[](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
|
-
```
|