n new Blob([vttSubtitles], { type: "text/vtt" });
}

function findClosest(el, tagName, className) {
	if (el.tagName === tagName && !className || el.classList.contains(className)) {
		return el;
	} else if (el.parentElement) {
		return findClosest(el.parentElement, tagName, className);
	}
	return null;
}

function onDocumentClickHandler(e) {
	const el = e.target;

	let link = el;

	if (link.tagName !== 'A') {
		link = findClosest(link, 'A');
	}

	if (link && (link.matches(".file a, .entry a, h1 a"))) {
		onL