Skip to content

Commit 826bd32

Browse files
authored
Manifest v3 (#78)
1 parent 7cea64e commit 826bd32

File tree

8 files changed

+19
-41
lines changed

8 files changed

+19
-41
lines changed

.devcontainer/devcontainer.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,4 +2,4 @@
22
"image": "node:18",
33
"postAttachCommand": "npm i",
44
"shutdownAction": "stopContainer"
5-
}
5+
}

.github/bot.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
11
next_release_name: ${next_minor_version}
2-
next_release_tag: ${next_minor_version}
2+
next_release_tag: ${next_minor_version}

build.ts

Lines changed: 5 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// Copyright (C) 2022 Katsute <https://github.com/Katsute>
1+
// Copyright (C) 2023 Katsute <https://github.com/Katsute>
22

33
import * as fs from "fs";
44
import * as path from "path";
@@ -11,16 +11,14 @@ abstract class Main {
1111
const src : string = path.join(__dirname, "src");
1212
const dist: string = path.join(__dirname, "dist");
1313

14-
const chrome : string = path.join(__dirname, "chrome.zip");
15-
const firefox: string = path.join(__dirname, "firefox.zip");
14+
const ext : string = path.join(__dirname, "extension.zip");
1615

1716
/* clear dist */ {
1817
if(fs.existsSync(dist))
1918
fs.rmSync(dist, {recursive: true});
2019
fs.mkdirSync(dist);
2120

22-
!fs.existsSync(chrome) || fs.rmSync(chrome, {recursive: true});
23-
!fs.existsSync(firefox) || fs.rmSync(firefox, {recursive: true});
21+
!fs.existsSync(ext) || fs.rmSync(ext, {recursive: true});
2422
}
2523

2624
/* copy src to zip */ {
@@ -39,25 +37,9 @@ abstract class Main {
3937
.trim());
4038
}
4139

42-
/* chrome */ {
43-
await zip(dist, chrome);
44-
}
45-
46-
/* firefox */ {
47-
// downgrade manifest
48-
const manifest: string = path.join(dist, "manifest.json");
49-
50-
fs.writeFileSync(manifest,
51-
fs.readFileSync(manifest, "utf-8")
52-
.replace(`"manifest_version": 3`, `"manifest_version": 2`));
40+
await zip(dist, ext);
5341

54-
// zip firefox add-on
55-
await zip(dist, firefox);
56-
}
57-
58-
/* cleanup */ {
59-
fs.rmSync(dist, {recursive: true});
60-
}
42+
fs.rmSync(dist, {recursive: true});
6143
}
6244

6345
}

package-lock.json

Lines changed: 7 additions & 9 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,5 @@
11
{
22
"name": "github-red-issues",
3-
"version": "main",
4-
"description": "Revert closed GitHub issues from purple back to red",
53
"private": true,
64
"scripts": {
75
"build": "ts-node build.ts"
@@ -17,8 +15,8 @@
1715
},
1816
"homepage": "https://github.com/KatsuteDev/GitHub-Red-Issues#readme",
1917
"devDependencies": {
20-
"@types/node": "18.11.9",
18+
"@types/node": "18.11.18",
2119
"typescript": "4.9.4",
2220
"zip-a-folder": "1.1.5"
2321
}
24-
}
22+
}

src/index.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
/* Copyright (C) 2022 Katsute <https://github.com/Katsute> */
1+
/* Copyright (C) 2023 Katsute <https://github.com/Katsute> */
22

33
"use strict";
44

src/manifest.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
"name": "GitHub Red Issues",
55
"author": "Katsute",
66
"description": "Revert closed GitHub issues from purple back to red.",
7-
"version": "3.7",
7+
"version": "4.0",
88
"homepage_url": "https://github.com/KatsuteDev/GitHub-Red-Issues",
99
"icons": {
1010
"16": "icon16.png",

src/style.css

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
/* Copyright (C) 2022 Katsute <https://github.com/Katsute> */
1+
/* Copyright (C) 2023 Katsute <https://github.com/Katsute> */
22

33
:root {
44
--rissue-pull-merged : var(--color-done-emphasis, #8957e5);

0 commit comments

Comments
 (0)