diff options
author | 2020-11-21 13:27:14 -0600 | |
---|---|---|
committer | 2020-11-21 13:27:14 -0600 | |
commit | c99595dc4755c99a6aa05a237c952bc1d9c08dfb (patch) | |
tree | 9244ead59ed89b09cb07e60f93d0271d2edfd724 /source/features/comments-time-machine-links.tsx | |
parent | 1bedcd71886ac9c20bf91a6d48e428622ab6d1b1 (diff) | |
download | refined-github-c99595dc4755c99a6aa05a237c952bc1d9c08dfb.tar.gz refined-github-c99595dc4755c99a6aa05a237c952bc1d9c08dfb.tar.zst refined-github-c99595dc4755c99a6aa05a237c952bc1d9c08dfb.zip |
Add `quick-fork-deletion` feature (#3734)
Diffstat (limited to 'source/features/comments-time-machine-links.tsx')
-rw-r--r-- | source/features/comments-time-machine-links.tsx | 11 |
1 files changed, 3 insertions, 8 deletions
diff --git a/source/features/comments-time-machine-links.tsx b/source/features/comments-time-machine-links.tsx index 3b16758f..c415bc31 100644 --- a/source/features/comments-time-machine-links.tsx +++ b/source/features/comments-time-machine-links.tsx @@ -1,5 +1,4 @@ import React from 'dom-chef'; -import XIcon from 'octicon/x.svg'; import select from 'select-dom'; import elementReady from 'element-ready'; import * as pageDetect from 'github-url-detection'; @@ -7,6 +6,7 @@ import * as pageDetect from 'github-url-detection'; import features from '.'; import * as api from '../github-helpers/api'; import GitHubURL from '../github-helpers/github-url'; +import addNotice from '../github-widgets/notice-bar'; import {appendBefore} from '../helpers/dom-utils'; import {buildRepoURL, isPermalink} from '../github-helpers'; @@ -107,13 +107,8 @@ async function showTimemachineBar(): Promise<void | false> { url.pathname = parsedUrl.pathname; } - const closeButton = <button className="flash-close js-flash-close" type="button" aria-label="Dismiss this message"><XIcon/></button>; - select('#start-of-content')!.after( - <div className="flash flash-full flash-notice"> - <div className="container-lg px-3"> - {closeButton} You can also <a className="rgh-link-date" href={String(url)}>view this object as it appeared at the time of the comment</a> (<relative-time datetime={date}/>) - </div> - </div> + addNotice( + <>You can also <a className="rgh-link-date" href={String(url)}>view this object as it appeared at the time of the comment</a> (<relative-time datetime={date}/>)</> ); } |