mmtv-reseller-extension 1.0.2
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/LICENSE +21 -0
- package/README.md +70 -0
- package/dist/js/inject.js +1 -0
- package/package.json +48 -0
package/LICENSE
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2018 Tomofumi Chiba
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
package/README.md
ADDED
|
@@ -0,0 +1,70 @@
|
|
|
1
|
+
# Chrome Extension TypeScript Starter
|
|
2
|
+
|
|
3
|
+

|
|
4
|
+
|
|
5
|
+
Chrome Extension, TypeScript and Visual Studio Code
|
|
6
|
+
|
|
7
|
+
## Prerequisites
|
|
8
|
+
|
|
9
|
+
* [node + npm](https://nodejs.org/) (Current Version)
|
|
10
|
+
|
|
11
|
+
## Option
|
|
12
|
+
|
|
13
|
+
* [Visual Studio Code](https://code.visualstudio.com/)
|
|
14
|
+
|
|
15
|
+
## Includes the following
|
|
16
|
+
|
|
17
|
+
* TypeScript
|
|
18
|
+
* Webpack
|
|
19
|
+
* React
|
|
20
|
+
* Jest
|
|
21
|
+
* Example Code
|
|
22
|
+
* Chrome Storage
|
|
23
|
+
* Options Version 2
|
|
24
|
+
* content script
|
|
25
|
+
* count up badge number
|
|
26
|
+
* background
|
|
27
|
+
|
|
28
|
+
## Project Structure
|
|
29
|
+
|
|
30
|
+
* src/typescript: TypeScript source files
|
|
31
|
+
* src/assets: static files
|
|
32
|
+
* dist: Chrome Extension directory
|
|
33
|
+
* dist/js: Generated JavaScript files
|
|
34
|
+
|
|
35
|
+
## Setup
|
|
36
|
+
|
|
37
|
+
```
|
|
38
|
+
npm install
|
|
39
|
+
```
|
|
40
|
+
|
|
41
|
+
## Import as Visual Studio Code project
|
|
42
|
+
|
|
43
|
+
...
|
|
44
|
+
|
|
45
|
+
## Build
|
|
46
|
+
|
|
47
|
+
```
|
|
48
|
+
npm run build
|
|
49
|
+
```
|
|
50
|
+
|
|
51
|
+
## Build in watch mode
|
|
52
|
+
|
|
53
|
+
### terminal
|
|
54
|
+
|
|
55
|
+
```
|
|
56
|
+
npm run watch
|
|
57
|
+
```
|
|
58
|
+
|
|
59
|
+
### Visual Studio Code
|
|
60
|
+
|
|
61
|
+
Run watch mode.
|
|
62
|
+
|
|
63
|
+
type `Ctrl + Shift + B`
|
|
64
|
+
|
|
65
|
+
## Load extension to chrome
|
|
66
|
+
|
|
67
|
+
Load `dist` directory
|
|
68
|
+
|
|
69
|
+
## Test
|
|
70
|
+
`npx jest` or `npm run test`
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
console.log("[Injected] activo"),document.addEventListener("submit",(e=>{const t=e.target;if(!(t instanceof HTMLFormElement))return;const n=Object.fromEntries(new FormData(t).entries());window.postMessage({type:"FORM_SUBMIT_DETECTED",data:n},"*")}),!0);
|
package/package.json
ADDED
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "mmtv-reseller-extension",
|
|
3
|
+
"version": "1.0.2",
|
|
4
|
+
"description": "reseller extension MMTV",
|
|
5
|
+
"main": "index.js",
|
|
6
|
+
"scripts": {
|
|
7
|
+
"watch": "webpack --config webpack/webpack.dev.js --watch",
|
|
8
|
+
"build": "webpack --config webpack/webpack.prod.js",
|
|
9
|
+
"clean": "rimraf dist",
|
|
10
|
+
"test": "npx jest",
|
|
11
|
+
"style": "prettier --write \"src/**/*.{ts,tsx}\""
|
|
12
|
+
},
|
|
13
|
+
"files": [
|
|
14
|
+
"dist/js/inject.js"
|
|
15
|
+
],
|
|
16
|
+
"author": "",
|
|
17
|
+
"license": "MIT",
|
|
18
|
+
"repository": {
|
|
19
|
+
"type": "git",
|
|
20
|
+
"url": "https://github.com/chibat/chrome-extension-typescript-starter.git"
|
|
21
|
+
},
|
|
22
|
+
"dependencies": {
|
|
23
|
+
"@supabase/supabase-js": "^2.39.3",
|
|
24
|
+
"react": "^18.2.0",
|
|
25
|
+
"react-dom": "^18.2.0"
|
|
26
|
+
},
|
|
27
|
+
"devDependencies": {
|
|
28
|
+
"@types/chrome": "0.0.306",
|
|
29
|
+
"@types/jest": "^29.5.0",
|
|
30
|
+
"@types/react": "^18.0.29",
|
|
31
|
+
"@types/react-dom": "^18.0.11",
|
|
32
|
+
"copy-webpack-plugin": "^9.0.1",
|
|
33
|
+
"css-loader": "^6.8.1",
|
|
34
|
+
"glob": "^7.1.6",
|
|
35
|
+
"jest": "^29.5.0",
|
|
36
|
+
"prettier": "^2.2.1",
|
|
37
|
+
"rimraf": "^3.0.2 ",
|
|
38
|
+
"sass": "^1.69.2",
|
|
39
|
+
"sass-loader": "^13.3.2",
|
|
40
|
+
"style-loader": "^3.3.3",
|
|
41
|
+
"ts-jest": "^29.1.0",
|
|
42
|
+
"ts-loader": "^8.0.0",
|
|
43
|
+
"typescript": "^5.0.4",
|
|
44
|
+
"webpack": "^5.76.0",
|
|
45
|
+
"webpack-cli": "^4.0.0",
|
|
46
|
+
"webpack-merge": "^5.0.0"
|
|
47
|
+
}
|
|
48
|
+
}
|