diff options
author | 2023-11-03 19:18:52 +0800 | |
---|---|---|
committer | 2023-11-03 11:18:52 +0000 | |
commit | cd544d525c2737712272905d823db0c4dabb9347 (patch) | |
tree | 34b326aee2c1b5a0aa6ba92dbc8854cc079fa40c | |
parent | 94aec84b08113c9b2de0c277317c55dbcaf4e6e3 (diff) | |
download | refined-github-cd544d525c2737712272905d823db0c4dabb9347.tar.gz refined-github-cd544d525c2737712272905d823db0c4dabb9347.tar.zst refined-github-cd544d525c2737712272905d823db0c4dabb9347.zip |
`link-to-changelog-file`: Drop broken `parseFromDom` (#7032)
-rw-r--r-- | source/features/link-to-changelog-file.tsx | 17 |
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, }); /* |