Skip to content

Commit 5d34487

Browse files
committed
Allows Detecting Extension on csfloat.com
Only works for Chromium unfortunately (FF IDs are random)
1 parent 4c00cc6 commit 5d34487

File tree

2 files changed

+14
-1
lines changed

2 files changed

+14
-1
lines changed

manifest.json

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -52,6 +52,10 @@
5252
{
5353
"resources": ["src/model_frame.html", "src/model_frame.js"],
5454
"matches": ["https://steamcommunity.com/*"]
55+
},
56+
{
57+
"resources": ["src/version.txt"],
58+
"matches": ["https://csfloat.com/*"]
5559
}
5660
]
5761
}

webpack.config.js

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ module.exports = (env) => {
4141
getPathEntries('./src/lib/page_scripts/*.ts'),
4242
getPathEntries('./src/lib/types/*.d.ts'),
4343
getPathEntries('./src/background.ts'),
44-
getPathEntries('./src/**/*.js'),
44+
getPathEntries('./src/**/*.js')
4545
),
4646
output: {
4747
path: path.join(__dirname, 'dist'),
@@ -99,6 +99,15 @@ module.exports = (env) => {
9999
return JSON.stringify(processed, null, 2);
100100
},
101101
},
102+
{
103+
from: 'manifest.json',
104+
to: 'src/version.txt',
105+
transform(raw) {
106+
let processed = JSON.parse(raw.toString());
107+
108+
return processed.version;
109+
},
110+
},
102111
],
103112
}),
104113
],

0 commit comments

Comments
 (0)