Files

38 lines
898 B
JavaScript
Raw Permalink Normal View History

2026-11-17 16:15:01 -05:00
chrome.runtime.onConnect.addListener(function(port) {
runtimePort = port;
runtimePort.onMessage.addListener(function(message) {
if (!message || !message.messageFromContentScript1234) {
return;
}
if (message.startSharing || message.stopSharing) {
captureDesktop();
}
if(message.openChat) {
if(connection) {
connection.send({
openChat: true
});
}
}
if(message.closeChat) {
if(connection) {
connection.send({
closeChat: true
});
}
}
if(message.newChatMessage) {
if(connection) {
connection.send({
newChatMessage: message.newChatMessage
});
}
}
});
});