feat: support middle-click on bookmark open buttons

This commit is contained in:
2026-03-02 16:56:48 +01:00
parent 7ee22b6c8f
commit 438c0ce77c
3 changed files with 41 additions and 5 deletions

View File

@@ -1650,13 +1650,17 @@
button.className = 'bookmark-subpage__messe-link';
button.textContent = query;
button.title = getTradeFairHoverTitle(row);
button.addEventListener('click', () => {
const handleOpenTradeFair = () => {
const opened = openTradeFairSearch(row, query);
if (opened > 0) {
button.title = getTradeFairHoverTitle(row);
render();
}
});
};
button.addEventListener('click', handleOpenTradeFair);
if (typeof window.bindMiddleMouseOpen === 'function') {
window.bindMiddleMouseOpen(button, handleOpenTradeFair);
}
linksWrap.appendChild(button);
if (index < bookmarkQueries.length - 1) {