Skip to content

Commit 10a7bd4

Browse files
committed
Update how meta files are generated
1 parent 36fb391 commit 10a7bd4

File tree

2 files changed

+10
-6
lines changed

2 files changed

+10
-6
lines changed

rollup.conf.js

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -32,10 +32,13 @@ module.exports = readdirSync(SOURCE, { withFileTypes: true }).filter(de => de.is
3232
}),
3333

3434
userscript(
35-
path.resolve(`${SOURCE}/${de.name}/index.js`),
35+
path.resolve(`${SOURCE}/${de.name}/meta.js`),
3636
meta => meta
37+
.replace('%name%', de.name)
3738
.replace('process.env.VERSION', pkg.version)
38-
.replace('process.env.AUTHOR', pkg.author),
39+
.replace('process.env.AUTHOR', pkg.author)
40+
.replace('%durl%', `https://raw.githubusercontent.com/quantix-dev/userscripts/main/dist/${de.name}.user.js`)
41+
.replace('%hurl%', `https://github.com/quantix-dev/userscripts/tree/main/src/${de.name}`),
3942
),
4043
],
4144

src/Spectacles/meta.js

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,13 @@
11
// ==UserScript==
2-
// @name Spectacles
2+
// @name %name%
3+
// @namespace WebEnhanced
34
// @author process.env.AUTHOR
4-
// @version 1.2.0
5-
// @namespace https://github.com/quantix-dev/userscripts/tree/main/src
5+
// @version process.env.VERSION
66
// @description Reddit glasses to remove blurry spoilers
77
// @match https://www.reddit.com/*
88
// @run-at document-idle
9-
// @downloadURL
9+
// @homepageURL %hurl%
10+
// @downloadURL %durl%
1011
// @supportURL https://github.com/quantix-dev/userscripts/issues
1112
// @require https://cdn.jsdelivr.net/combine/npm/@violentmonkey/dom@2,npm/@violentmonkey/ui@0.7
1213
// ==/UserScript==

0 commit comments

Comments
 (0)