<commit_before>import {h} from 'dom-chef';
import select from 'select-dom';
import * as pageDetect from '../libs/page-detect';

export default () => {
	if (pageDetect.isRepoTree()) {
		const buttonGroup = select(`.file-navigation .BtnGroup.float-right`);
		if (buttonGroup) {
			buttonGroup.prepend(
				<a
					class="btn btn-sm BtnGroup-item"
					href={`https://download-directory.github.io/?url=${location.href}`}>
					Download
				</a>);
		}
	}<commit_msg>Avoid duplicate Download Folder buttons (#1025)<commit_after>import {h} from 'dom-chef';
import select from 'select-dom';
import * as pageDetect from '../libs/page-detect';

export default () => {
	if (pageDetect.isRepoTree()) {
		const buttonGroup = select(`.file-navigation .BtnGroup.float-right`);
		if (buttonGroup && !select.exists('.rgh-download-folder')) {
			buttonGroup.prepend(
				<a
					class="btn btn-sm BtnGroup-item rgh-download-folder"
					href={`https://download-directory.github.io/?url=${location.href}`}>
					Download
				</a>);
		}
	}
{'fraction_non_alphanumeric': 0.17450980392156862, 'fraction_numerical': 0.00392156862745098, 'mean_word_length': 3.838862559241706, 'pattern_counts': {'":': 0, '<': 7, '<?xml version=': 0, '>': 9, 'https://': 2, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 7, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '6193101', 'n_tokens_mistral': 390, 'n_tokens_neox': 336, 'n_words': 69}