Skip to content

Commit 12ee45e

Browse files
committed
Install latest select-dom and fix dom issue
1 parent d7f7728 commit 12ee45e

8 files changed

+11
-11
lines changed

package-lock.json

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

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@
2929
"linkify-issues": "^1.3.0",
3030
"linkify-urls": "^2.2.0",
3131
"onetime": "^5.0.0",
32-
"select-dom": "^5.0.0",
32+
"select-dom": "^5.0.1",
3333
"shorten-repo-url": "^1.5.0",
3434
"tiny-version-compare": "^0.10.0",
3535
"webext-domain-permission-toggle": "^0.1.0",

source/features/batch-open-issues.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ const confirmationRequiredCount = 10;
77

88
function getUrlFromItem(checkbox: Element) {
99
return (
10-
checkbox!
10+
checkbox
1111
.closest('.js-issue-row')!
1212
.querySelector('.js-navigation-open') as HTMLAnchorElement
1313
).href;

source/features/collapsible-content-button.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ function init() {
4343
}
4444

4545
function addContentToDetails(event: DelegateEvent<MouseEvent>) {
46-
const field = (event.delegateTarget as HTMLButtonElement)!.form!['comment[body]'];
46+
const field = (event.delegateTarget as HTMLButtonElement).form!['comment[body]'];
4747

4848
// Don't indent <summary> because indentation will not be automatic on multi-line content
4949
const newContent = `

source/features/comments-time-machine-links.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ function init() {
99

1010
for (const comment of comments) {
1111
const timestampEl = select('relative-time', comment.closest('.discussion-item-review') || comment)!;
12-
const timestamp = timestampEl.attributes['datetime'].value; // eslint-disable-line dot-notation
12+
const timestamp = (timestampEl.attributes as any).datetime.value;
1313
const href = `/${getRepoURL()}/tree/HEAD@{${timestamp}}`;
1414

1515
timestampEl.parentElement!.after(

source/features/mark-unread.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -235,7 +235,7 @@ async function renderNotifications(unreadNotifications: Notification[]): Promise
235235
const item = getNotification(notification);
236236

237237
pageList!.prepend(group);
238-
group!
238+
group
239239
.querySelector('ul.notifications')!
240240
.prepend(item);
241241
});

source/features/show-names.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -40,8 +40,8 @@ async function init(): AsyncFeatureInit {
4040
if (name) {
4141
// If it's a regular comment author, add it outside <strong>
4242
// otherwise it's something like "User added some commits"
43-
const insertionPoint = usernameEl.parentElement!.tagName === 'STRONG' ? usernameEl.parentElement : usernameEl;
44-
insertionPoint!.after(' (', <bdo>{name}</bdo>, ') ');
43+
const insertionPoint = usernameEl.parentElement!.tagName === 'STRONG' ? usernameEl.parentElement! : usernameEl;
44+
insertionPoint.after(' (', <bdo>{name}</bdo>, ') ');
4545
}
4646
}
4747
}

source/features/swap-branches-on-compare.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ function init() {
1616
}
1717

1818
const icon = select('.octicon-arrow-left')!;
19-
icon.parentElement!.attributes['aria-label'].value += '.\nClick to swap.';
19+
(icon.parentElement!.attributes as any)['aria-label'].value += '.\nClick to swap.';
2020
wrap(icon, <a href={`/${getRepoURL()}/compare/${references.join('...')}`}></a>);
2121
}
2222

0 commit comments

Comments
 (0)