One Tab Only Addon

Hello! :smile:

Coming from Working with Multiple Browser Tabs - #31 by colesnicov, to reduce the offtopic conversation from going there, I’m going to create a new post for the “one tab only” addon here again:

This addon is a change I’ve added to our instance of Zammad. It is a javascript snippet which ensures only one tab is of Zammad is ever open at a time. It solves directly opening links from other chat platforms.

It does so by sending out a window message with the current url to any other potential open Zammad tab and if any responds, it closes itself, while the already opened Zammad tab opens the received url. (Along with sending a notification if the window is not visible, so the window can be focused by clicking on it).

It is not the best solution for sure, as it currently takes a bit for this whole process to happen while it probably still fetches lots of unnecessary data from Zammad simultaneously and it can’t automatically have the tab take focus, so I am thinking about writing a browser extension to archive this instead at some later point in the future or improving the current approach some more.