Intercept sent notifications from an Electron app

无人久伴 提交于 2019-12-11 04:38:43

问题


Given a 3rd-party Electron app (in my case WhatsApp.app for OSX) I'd like to intercept it's calls to Notification Center as well as calls made to update it's badge. (Specifically I want this so I can display the "unread count" in the system menu bar, using TextBar).

There's an app.asar archive under Resources/, and I can see it uses a specific node module for notifications.

Before I dig further, assuming I find what I want to change, what's the way to go about intercepting those calls later? (Complete Electron newbie).

来源:https://stackoverflow.com/questions/45005973/intercept-sent-notifications-from-an-electron-app

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!