Browse Source

Fixed issue whith gmail and notifications

A lot of issues was reporting that clicking on a notification from gmail was opening an external tab.
Simply disabling addEventListener is working.
pull/1864/head
Simon Sassi 7 years ago committed by GitHub
parent
commit
9e3573b987
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 5
      resources/js/rambox-service-api.js

5
resources/js/rambox-service-api.js

@ -38,6 +38,11 @@ Notification = function(title, options) {
ipcRenderer.sendToHost('rambox.showWindowAndActivateTab'); ipcRenderer.sendToHost('rambox.showWindowAndActivateTab');
}); });
//It seems that gmail is checking if such event handler func are available. Just remplacing them by a void function that is always returning true is making the rights rights!
notification.addEventListener = function(a, b) {return true};
notification.attachEvent = function(a, b) {return true};
notification.addListener = function(a, b) {return true};
return notification; return notification;
} }

Loading…
Cancel
Save