Searches for reposts or just a picture messages in VK Messenger. Just open a chat and click "Find reposts"!
Searches for reposts or just a picture messages in VK Messenger. Just open a chat and click "Find reposts"!
The template: Kenya-West/userscript-typescript-template
An opinionated template repo using Webpack and TypeScript to build your userscript for Tampermonkey and more extensions.
Based on pboymt/userscript-typescript-template.
Just write your styles in src/assets/styles/styles.scss
and they will append in web page's <head></head>
!
You can also add your own files with .css
or .scss
extension in StylesInjecter
class.
The repository generates two different assets (files):
index.user.js
);index.hot-reload.user.js
) has userscript's meta info and reference to the first asset so you can copy and paste its entire code to Tampermonkey once.This allows you faster updating scripts by automatically picking up recent changes.
The project has different classes to:
# Use Github CLI
$ gh repo clone kenya-west/userscript-typescript-template-kw
# Or use 'git clone' command directly
$ git clone https://github.com/Kenya-West/userscript-typescript-template-kw.git
npm ci
.userscript
object in package.json
, you can refer to the comments in plugins/userscript.plugin.ts
.src
directory (like src/index.ts
).npm run build
or npm run build:watch
to auto-update resulting bundle on changes.index.hot-reload.user.ts
to Tampermonkey -> Add new script.You need install other loader plugins to support other file types.
Allow Tampermonkey's access to local file URIs (Tampermonkey FAQs) and import built userscript's file URL.
You can publish your userscript to Greasy Fork or other websites.
You can push your userscript to Github and import it to Greasy Fork.
static
classesCurrently, some classes need to be instantiated, some have static method. Choose one unified way to call them.
If you create elements, you need to remember which strings to use. You can confuse them. Make a way to pre-define and reuse strings of ids of custom HTML elements.
Currently, to create a custom HTML element, you need to create an abstract class, then a base class, and then finally, final class of your element. Why do we need 3 steps to make it?
Some HTML element just need a base control methods and that's it. Make a general custom HTML element class.
Strangers may be lost with so many classes. What the proper way to create custom HTML element? How to add custom styles? How to add support for custom file types? Add an action? What is this for? This is where the fun begins we need clear misunderstanding.