Skip to content

Commit cf893ac

Browse files
committed
init
0 parents  commit cf893ac

9 files changed

+5019
-0
lines changed

.editorconfig

+8
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
root = true
2+
3+
[*]
4+
end_of_line = lf
5+
insert_final_newline = true
6+
charset = utf-8
7+
indent_style = space
8+
indent_size = 4

.eslintrc.cjs

+11
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
module.exports = {
2+
"env": {
3+
"browser": true,
4+
"es2021": true
5+
},
6+
"extends": "eslint:recommended",
7+
"parserOptions": {
8+
"ecmaVersion": 12,
9+
"sourceType": "module"
10+
}
11+
};

.gitignore

+3
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
.ff-profile/
2+
node_modules/
3+
*.log

addon/.gitignore

+1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
*.js

addon/manifest.json

+11
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
{
2+
"manifest_version": 2,
3+
"name": "Blaseball+",
4+
"version": "1.0",
5+
"content_scripts": [
6+
{
7+
"matches": ["*://*.blaseball.com/*"],
8+
"js": ["content_script.js"]
9+
}
10+
]
11+
}

lib/content.js

+1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
console.log('Hello, world!');

package.json

+27
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
{
2+
"name": "blaseball-plus",
3+
"version": "1.0.0",
4+
"description": "",
5+
"main": "index.js",
6+
"scripts": {
7+
"test": "echo \"Error: no test specified\" && exit 1",
8+
"build:js": "webpack",
9+
"build:unsigned:ext": "cd addon && web-ext build",
10+
"build:signed:ext": "cd addon && web-ext build",
11+
"build:unsigned": "npm run build:js && npm run build:unsigned:ext",
12+
"build:signed": "npm run build:js && npm run build:signed:ext",
13+
"build": "npm run build:unsigned",
14+
"start": "webpack watch"
15+
},
16+
"author": "leo60228",
17+
"license": "GPL-2.0-only",
18+
"devDependencies": {
19+
"@leo60228/web-ext-webpack-plugin": "^1.0.1",
20+
"eslint": "^7.20.0",
21+
"web-ext": "^5.5.0",
22+
"webpack": "^5.23.0",
23+
"webpack-cli": "^4.5.0"
24+
},
25+
"dependencies": {},
26+
"type": "module"
27+
}

webpack.config.mjs

+28
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
import { dirname, resolve } from 'path';
2+
import { fileURLToPath } from 'url';
3+
import WebExtWebpackPlugin from '@leo60228/web-ext-webpack-plugin';
4+
5+
const cwd = dirname(fileURLToPath(import.meta.url));
6+
const addonDir = resolve(cwd, 'addon');
7+
8+
const config = {
9+
mode: 'development',
10+
devtool: 'eval-source-map',
11+
entry: {
12+
content_script: './lib/content.js',
13+
},
14+
output: {
15+
path: addonDir,
16+
filename: '[name].js'
17+
},
18+
plugins: [
19+
new WebExtWebpackPlugin(addonDir, {
20+
startUrl: ['www.blaseball.com'],
21+
firefoxProfile: resolve(cwd, '.ff-profile'),
22+
profileCreateIfMissing: true,
23+
keepProfileChanges: true
24+
})
25+
]
26+
};
27+
28+
export default config;

0 commit comments

Comments
 (0)