(const closeLink of document.querySelectorAll('#close-all-other-web-clients')) {
			if (navigator.serviceWorker) {
				closeLink.onclick = () => {
					window.navigator.serviceWorker.controller.postMessage({ type: 'closeAllJoplinWebTabs' });
				};
			} else {
				closeLink.replaceWith(document.createTextNode(closeLink.textContent));
			}
		}
	</script>
</html>