Skip to content

Commit 10fed5b

Browse files
authored
Fix project tables sidebar label (#69)
1 parent 4d1c149 commit 10fed5b

File tree

2 files changed

+6
-5
lines changed

2 files changed

+6
-5
lines changed

src/index.js

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -15,11 +15,12 @@ const whenElementAdded = (selector, f) => {
1515
if(window.location.pathname.toLowerCase().includes("/projects/"))
1616
whenElementAdded(`#__primerPortalRoot__`, (e) => {
1717
e.addEventListener("DOMNodeInserted", (i) => {
18-
if(i.target.tagName && i.target.tagName.toLowerCase() == "svg") // find svg
19-
for(const child of i.target.children) // check svg content
20-
if(child.getAttribute("d") == "M11.28 6.78a.75.75 0 00-1.06-1.06L7.25 8.69 5.78 7.22a.75.75 0 00-1.06 1.06l2 2a.75.75 0 001.06 0l3.5-3.5z") // checkmark
18+
let svg;
19+
if(svg = i.target.querySelector("figure > span > svg"))
20+
for(const child of svg.children) // check svg content
21+
if(child.getAttribute("d") == "M11.28 6.78a.75.75 0 00-1.06-1.06L7.25 8.69 5.78 7.22a.75.75 0 00-1.06 1.06l2 2a.75.75 0 001.06 0l3.5-3.5z") // check
2122
return setTimeout(() => {
22-
i.target.parentElement.classList.add("rissue-closed-bg"); // apply css
23+
svg.parentElement.classList.add("rissue-closed-bg"); // apply css
2324
}, 100); // doesn't work unless we delay
2425
});
2526
});

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.4",
7+
"version": "3.5",
88
"homepage_url": "https://github.com/KatsuteDev/GitHub-Red-Issues",
99
"icons": {
1010
"16": "icon16.png",

0 commit comments

Comments
 (0)