Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 43e6b9dd authored by theronakpatel's avatar theronakpatel
Browse files

Console error issue

parent 2f46bc60
Loading
Loading
Loading
Loading
Loading
+9 −9
Original line number Diff line number Diff line
document.addEventListener('DOMContentLoaded', function() {
	const headerElement = document.querySelector('#header');
	const headerElement = document.querySelector('#header')
	if (headerElement) {
		const searchHelpText = t('core', 'Due to encryption the search is only done on files\' name.');
		const attr = '#unified-search .empty-content:after, #unified-search .unified-search-modal__results:after';
		const style = `{ content: "${searchHelpText.replace(/'/g, '\\\'')}" }`; // Correctly escape single quotes
		const newStyle = document.createElement('style');
		newStyle.innerHTML = attr + style;
		headerElement.appendChild(newStyle);
		const searchHelpText = t('core', 'Due to encryption the search is only done on files\' name.')
		const attr = '#unified-search .empty-content:after, #unified-search .unified-search-modal__results:after'
		const style = `{ content: "${searchHelpText.replace(/'/g, '\\\'')}" }` // Correctly escape single quotes
		const newStyle = document.createElement('style')
		newStyle.innerHTML = attr + style
		headerElement.appendChild(newStyle)
	} else {
		console.error('Element with ID "header" not found.');
		console.error('Element with ID "header" not found.')
	}
});
 No newline at end of file
})