diff options
author | 2019-02-13 14:23:03 +0800 | |
---|---|---|
committer | 2019-02-13 14:23:03 +0800 | |
commit | 7af18883aa400ab463d0c121be6fcf84c1cba142 (patch) | |
tree | cc1764cb4ee32e78fe0c7c8a6740514d8d97bd9f /source/features/copy-file.tsx | |
parent | 38b53105f8ff8356140e80b49a7a85ca2e5589a2 (diff) | |
download | refined-github-7af18883aa400ab463d0c121be6fcf84c1cba142.tar.gz refined-github-7af18883aa400ab463d0c121be6fcf84c1cba142.tar.zst refined-github-7af18883aa400ab463d0c121be6fcf84c1cba142.zip |
Meta: Simplify select-dom usage
Thanks to https://github.com/bfred-it/select-dom/pull/5
Diffstat (limited to 'source/features/copy-file.tsx')
-rw-r--r-- | source/features/copy-file.tsx | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/source/features/copy-file.tsx b/source/features/copy-file.tsx index 3cff95ab..6e7a500f 100644 --- a/source/features/copy-file.tsx +++ b/source/features/copy-file.tsx @@ -6,11 +6,11 @@ import {groupSiblings} from '../libs/group-buttons'; function init() { // This selector skips binaries + markdowns with code - for (const code of select.all<HTMLElement>('.file .blob-wrapper > .highlight:not(.rgh-copy-file)')) { + for (const code of select.all('.file .blob-wrapper > .highlight:not(.rgh-copy-file)')) { code.classList.add('rgh-copy-file'); const file = code.closest('.file'); - const content = select.all<HTMLElement>('.blob-code-inner', file) + const content = select.all('.blob-code-inner', file) .map(blob => blob.innerText) .map(line => line === '\n' ? '' : line) .join('\n'); |