Skip to content

Commit 207f85b

Browse files
committed
Add-details: Fix selector
1 parent acf4e9d commit 207f85b

1 file changed

Lines changed: 3 additions & 3 deletions

File tree

github-issue-add-details.user.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
// ==UserScript==
22
// @name GitHub Issue Add Details
3-
// @version 1.0.9
3+
// @version 1.0.10
44
// @description A userscript that adds a button to insert a details block into comments
55
// @license MIT
66
// @author Rob Garrison
@@ -40,8 +40,8 @@
4040
button.innerHTML = icon;
4141
[...document.querySelectorAll(".toolbar-commenting")].forEach(el => {
4242
if (el && !$(".ghad-details", el)) {
43-
const btn = $("[aria-label='Add a task list']", el);
44-
btn.parentNode.insertBefore(button.cloneNode(true), btn.nextSibling);
43+
const btn = $("[aria-label*='Add a task list']", el);
44+
btn.before(button.cloneNode(true));
4545
}
4646
});
4747
}

0 commit comments

Comments
 (0)