Skip to content

Commit 61a621c

Browse files
authored
Fix commits search being colored incorrectly (#84)
1 parent a7be8a8 commit 61a621c

File tree

2 files changed

+5
-4
lines changed

2 files changed

+5
-4
lines changed

src/index.js

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -27,8 +27,9 @@
2727

2828
if(window.location.pathname.toLowerCase() === "/search"){
2929
const apply = (e) => {
30-
for(const path of e.querySelectorAll(`path[d="M0 8a8 8 0 1 1 16 0A8 8 0 0 1 0 8Zm1.5 0a6.5 6.5 0 1 0 13 0 6.5 6.5 0 0 0-13 0Zm10.28-1.72-4.5 4.5a.75.75 0 0 1-1.06 0l-2-2a.751.751 0 0 1 .018-1.042.751.751 0 0 1 1.042-.018l1.47 1.47 3.97-3.97a.751.751 0 0 1 1.042.018.751.751 0 0 1 .018 1.042Z"]`))
31-
path.parentElement.classList.add("rissue-closed-fg");
30+
if(window.location.search.includes("type=issues"))
31+
for(const path of e.querySelectorAll(`path[d="M0 8a8 8 0 1 1 16 0A8 8 0 0 1 0 8Zm1.5 0a6.5 6.5 0 1 0 13 0 6.5 6.5 0 0 0-13 0Zm10.28-1.72-4.5 4.5a.75.75 0 0 1-1.06 0l-2-2a.751.751 0 0 1 .018-1.042.751.751 0 0 1 1.042-.018l1.47 1.47 3.97-3.97a.751.751 0 0 1 1.042.018.751.751 0 0 1 .018 1.042Z"]`))
32+
path.parentElement.classList.add("rissue-closed-fg");
3233
};
3334

3435
whenElementAdded(`react-app[app-name="blackbird-search"]`, (e) => {
@@ -39,5 +40,5 @@
3940
};
4041

4142
init();
42-
window.addEventListener("popstate", init);
43+
window.addEventListener("turbo:render", init);
4344
})();

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

0 commit comments

Comments
 (0)