[frontend] Add middle click support for opening hue links in a new page
ko.bindingHandlers.click.init(element, function() {
return function (data, event) {
var url = ko.unwrap(valueAccessor());
- if (event.ctrlKey || event.metaKey) {
+ if (event.ctrlKey || event.metaKey || event.which === 2) {
window.open('/hue' + (url.indexOf('/') === 0 ? url : '/' + url), '_blank');
} else {
huePubSub.publish('open.link', url);
