Files
sean 0e8a8b3028
Some checks are pending
deploy-testing / deploy (push) Waiting to run
Initial testing snapshot
2026-11-17 16:15:01 -05:00

23 lines
857 B
JavaScript

// Muaz Khan - www.MuazKhan.com
// MIT License - www.WebRTC-Experiment.com/licence
// Github - github.com/muaz-khan/Firefox-Extensions
// window.postMessage({ enableScreenCapturing: true }, "*");
window.addEventListener("message", function(event) {
// do NOT allow external domains
// via: https://github.com/muaz-khan/Firefox-Extensions/issues/11
if (event.source !== document.defaultView) return;
var addonMessage = event.data;
// this content-script is used to check whether screen capturing is enabled for your own domain or not.
if(addonMessage && addonMessage.checkIfScreenCapturingEnabled) {
self.port.on('is-screen-capturing-enabled-response', function(response) {
window.postMessage(response, '*');
});
self.port.emit('is-screen-capturing-enabled');
}
}, false);