summaryrefslogtreecommitdiff
path: root/source/features/comments-time-machine-links.tsx
diff options
context:
space:
mode:
Diffstat (limited to 'source/features/comments-time-machine-links.tsx')
-rw-r--r--source/features/comments-time-machine-links.tsx8
1 files changed, 4 insertions, 4 deletions
diff --git a/source/features/comments-time-machine-links.tsx b/source/features/comments-time-machine-links.tsx
index 6ea729d4..2c932650 100644
--- a/source/features/comments-time-machine-links.tsx
+++ b/source/features/comments-time-machine-links.tsx
@@ -1,5 +1,5 @@
import React from 'dom-chef';
-import select from 'select-dom';
+import {$, $$} from 'select-dom';
import elementReady from 'element-ready';
import * as pageDetect from 'github-url-detection';
@@ -17,7 +17,7 @@ async function updateURLtoDatedSha(url: GitHubFileURL, date: string): Promise<vo
const {repository} = await api.v4(GetCommitAtDate, {variables: {date, branch: url.branch}});
const [{oid}] = repository.ref.target.history.nodes;
- select('a.rgh-link-date')!.pathname = url.assign({branch: oid}).pathname;
+ $('a.rgh-link-date')!.pathname = url.assign({branch: oid}).pathname;
}
async function showTimeMachineBar(): Promise<void | false> {
@@ -65,7 +65,7 @@ async function showTimeMachineBar(): Promise<void | false> {
function addInlineLinks(menu: HTMLElement, timestamp: string): void {
const comment = menu.closest('.js-comment')!;
// TODO: Move selector directly to observer
- const links = select.all(`
+ const links = $$(`
a[href^="${location.origin}"][href*="/blob/"]:not(.${linkifiedURLClass}),
a[href^="${location.origin}"][href*="/tree/"]:not(.${linkifiedURLClass})
`, comment);
@@ -86,7 +86,7 @@ function addInlineLinks(menu: HTMLElement, timestamp: string): void {
}
function addDropdownLink(menu: HTMLElement, timestamp: string): void {
- select('.show-more-popover', menu.parentElement!)!.append(
+ $('.show-more-popover', menu.parentElement!)!.append(
<div className="dropdown-divider"/>,
<a
href={buildRepoURL(`tree/HEAD@{${timestamp}}`)}