Skip to content

Commit af128d3

Browse files
committed
Closed = 🔴
1 parent 62a0a52 commit af128d3

File tree

6 files changed

+537
-341
lines changed

6 files changed

+537
-341
lines changed

.gitignore

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
.vs
2+
.vscode
3+
4+
*.crx
5+
*.pem

LICENSE

Lines changed: 437 additions & 339 deletions
Large diffs are not rendered by default.

README.md

Lines changed: 21 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,21 @@
1-
# GitHub-Red-Issues-Extension
2-
Revert closed GitHub issues from purple back to red.
1+
# GitHub Red Closed Issues Extension
2+
3+
[![Creative Commons License](https://i.creativecommons.org/l/by-nc-sa/4.0/88x31.png)](http://creativecommons.org/licenses/by-nc-sa/4.0/)
4+
5+
Chrome extension to revert closed GitHub issues from purple back to red.
6+
7+
## Installation
8+
9+
1. Checkout or download this repository locally (press the code button in the top right).
10+
2. Go to <chrome://extensions/> and turn on **Developer mode** in the top right.
11+
3. Press **Load unpacked** and select the `src` folder.
12+
4. Resume coding with closed issues being red.
13+
14+
## Changes
15+
16+
Found a bug? Open a new [issue](https://github.com/Katsute/GitHub-Red-Issues-Extension/issues).
17+
18+
- Closed pinned issues are red.
19+
- Closed issues on issues tab are red.
20+
- Closed issue on hover is red.
21+
- Issue open/close events on timeline are green and red.

src/index.js

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
// Copyright (C) 2021 Katsute <https://github.com/Katsute>
2+
3+
"use strict";
4+
5+
removeInlineCSS();
6+
7+
// run for 30s in case the site hasn't loaded yet
8+
let loop = 0;
9+
const interval = setInterval(() => {
10+
removeInlineCSS();
11+
if(loop++ >= 30)
12+
clearInterval(this);
13+
}, 1000);
14+
15+
// remove inlined css from timeline
16+
function removeInlineCSS(){
17+
for(const badge of document.getElementsByClassName("TimelineItem-badge"))
18+
if(badge.style.cssText == "background-color: var(--color-done-emphasis) !important;")
19+
badge.style.cssText = "";
20+
}

src/manifest.json

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
{
2+
"manifest_version": 3,
3+
4+
"name": "GitHub Red Closed Issues",
5+
"author": "Katsute",
6+
"description": "Revert closed GitHub issues from purple back to red.",
7+
"version": "1.0",
8+
"homepage_url": "https://github.com/Katsute/GitHub-Red-Issues-Extension",
9+
10+
"permissions": ["tabs"],
11+
"content_scripts": [{
12+
"css": ["style.css"],
13+
"js": ["index.js"],
14+
"matches": ["https://github.com/*"]
15+
}]
16+
}

src/style.css

Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
/* Copyright (C) 2021 Katsute <https://github.com/Katsute> */
2+
3+
/* issue icon */
4+
5+
.issue-closed-done .octicon-issue-closed {
6+
color: #F85149 !important;
7+
}
8+
9+
/* issue hover */
10+
11+
.Popover .octicon.octicon-issue-closed.color-text-danger {
12+
color: #F85149 !important;
13+
}
14+
15+
/* issue badge */
16+
17+
span[title="Status: Closed"] {
18+
background-color: #F85149 !important;
19+
}
20+
21+
span[title="Status: Closed"] .octicon-issue-closed {
22+
color: #F0F6Fc !important;
23+
}
24+
25+
/* timeline */
26+
27+
.TimelineItem-badge.color-bg-success-inverse {
28+
background-color: #238636 !important;
29+
}
30+
31+
.TimelineItem-badge.color-bg-danger-inverse {
32+
background-color: #F85149 !important;
33+
}
34+
35+
.TimelineItem-badge.color-bg-danger-inverse .octicon,
36+
.TimelineItem-badge.color-bg-success-inverse .octicon {
37+
color: #F0F6Fc !important;
38+
}

0 commit comments

Comments
 (0)