mirror of https://github.com/dani/vroom.git
Video conf based on SimpleWebRTC https://vroom.fws.fr/documentation
You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
14 lines
507 B
14 lines
507 B
/* the chrome content script which can listen to the page dom events */
|
|
var channel = chrome.runtime.connect();
|
|
channel.onMessage.addListener(function (message) {
|
|
console.log('channel message', message);
|
|
window.postMessage(message, '*');
|
|
});
|
|
|
|
window.addEventListener('message', function (event) {
|
|
if (event.source != window)
|
|
return;
|
|
if (!event.data && (event.data.type == 'getScreen' || event.data.type == 'cancelGetScreen'))
|
|
return;
|
|
channel.postMessage(event.data);
|
|
});
|
|
|