From 9e3573b9877a542d8a528d9f46ad56e7e310fc30 Mon Sep 17 00:00:00 2001 From: Simon Sassi Date: Fri, 21 Sep 2018 20:49:00 +0200 Subject: [PATCH 1/2] 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. --- resources/js/rambox-service-api.js | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/resources/js/rambox-service-api.js b/resources/js/rambox-service-api.js index c09152bf..a287c146 100644 --- a/resources/js/rambox-service-api.js +++ b/resources/js/rambox-service-api.js @@ -37,6 +37,11 @@ Notification = function(title, options) { notification.addEventListener('click', function() { 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; } From 74b93b6cc0efb1b384d02a53a705fedfeb06fa58 Mon Sep 17 00:00:00 2001 From: Simon Sassi Date: Sat, 22 Sep 2018 15:43:52 +0200 Subject: [PATCH 2/2] Update rambox-service-api.js --- resources/js/rambox-service-api.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/resources/js/rambox-service-api.js b/resources/js/rambox-service-api.js index a287c146..68d96bb3 100644 --- a/resources/js/rambox-service-api.js +++ b/resources/js/rambox-service-api.js @@ -38,7 +38,7 @@ Notification = function(title, options) { 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! + //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 thing right! notification.addEventListener = function(a, b) {return true}; notification.attachEvent = function(a, b) {return true}; notification.addListener = function(a, b) {return true};