summaryrefslogtreecommitdiff
path: root/source/features/link-to-changelog-file.tsx
diff options
context:
space:
mode:
Diffstat (limited to 'source/features/link-to-changelog-file.tsx')
-rw-r--r--source/features/link-to-changelog-file.tsx17
1 files changed, 0 insertions, 17 deletions
diff --git a/source/features/link-to-changelog-file.tsx b/source/features/link-to-changelog-file.tsx
index 08661d12..25352a27 100644
--- a/source/features/link-to-changelog-file.tsx
+++ b/source/features/link-to-changelog-file.tsx
@@ -1,6 +1,5 @@
import React from 'dom-chef';
import {CachedFunction} from 'webext-storage-cache';
-import {$$} from 'select-dom';
import {BookIcon} from '@primer/octicons-react';
import elementReady from 'element-ready';
import * as pageDetect from 'github-url-detection';
@@ -21,15 +20,6 @@ function findChangelogName(files: string[]): string | false {
return files.find(name => changelogFiles.test(name)) ?? false;
}
-function parseFromDom(): false {
- const files = $$('[aria-labelledby="files"] .js-navigation-open[href*="/blob/"').map(file => file.title);
- void changelogName.applyOverride(
- [findChangelogName(files) as string] /* TODO: Type mistake */,
- getRepo()!.nameWithOwner,
- );
- return false;
-}
-
const changelogName = new CachedFunction('changelog', {
async updater(nameWithOwner: string): Promise<string | false> {
const [owner, name] = nameWithOwner.split('/');
@@ -86,13 +76,6 @@ void features.add(import.meta.url, {
],
deduplicate: 'has-rgh-inner',
init,
-}, {
- include: [
- pageDetect.isRepoHome,
- ],
- deduplicate: 'has-rgh',
- awaitDomReady: true, // Does not affect current visit
- init: parseFromDom,
});
/*