You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
1. Allow Tampermonkey's access to local file URIs. ([Tampermonkey FAQs](https://tampermonkey.net/faq.php?ext=dhdg#Q204))
27
-
2. Install dependencies with `npm install` or `npm ci`.
28
-
3. Write `userscript` settings in package.json, you can refer to the comments in [plugins/userscript.plugin.ts](./plugins/userscript.plugin.ts).
29
-
4. Code your userscript in `src` directory (like [src/index.ts](./src/index.ts)).
30
-
5. Generate userscript with `npm run build`.
31
-
6. Import generated userscript to Tampermonkey by local file URI.
26
+
1. Install dependencies with `npm install` or `npm ci`.
27
+
2. Edit settings in `userscript` object in [`package.json`](./package.json), you can refer to the comments in [`plugins/userscript.plugin.ts`](./plugins/userscript.plugin.ts).
28
+
3. Code your userscript in `src` directory (like [`src/index.ts`](./src/index.ts)).
29
+
4. Generate userscript with `npm run build`.
30
+
5. Import generated userscript to Tampermonkey by local file URI.
32
31
33
-
### Use other file types
32
+
### Compile other file types
34
33
35
34
You need install other loader plugins to support other file types.
36
35
37
-
For example, you can use `scss-loader` to compile `.scss` files. Install it with `npm install --save-dev scss-loader node-sass` and add it in [webpack.config.ts](./webpack.config.ts).
36
+
For example, you can use `scss-loader` to compile `.scss` files. Install it with `npm install --save-dev scss-loader node-sass` and add it in [`webpack.config.ts`](./webpack.config.ts).
38
37
39
-
### After
38
+
### Debug
39
+
40
+
Allow Tampermonkey's access to local file URIs ([Tampermonkey FAQs](https://tampermonkey.net/faq.php?ext=dhdg#Q204)) and import built userscript's file URL.
41
+
42
+
### Publish you userscript
40
43
41
44
You can publish your userscript to [Greasy Fork](https://greasyfork.org/) or other websites.
0 commit comments