mirror of
https://github.com/hensm/fx_cast.git
synced 2026-06-10 01:29:58 +00:00
Initial commit
This commit is contained in:
12
ext/src/content.js
Normal file
12
ext/src/content.js
Normal file
@@ -0,0 +1,12 @@
|
||||
"use strict";
|
||||
|
||||
document.addEventListener("__castMessageResponse", ev => {
|
||||
browser.runtime.sendMessage(ev.detail);
|
||||
})
|
||||
|
||||
browser.runtime.onMessage.addListener(message => {
|
||||
const event = new CustomEvent("__castMessage", {
|
||||
detail: JSON.stringify(message)
|
||||
});
|
||||
document.dispatchEvent(event);
|
||||
});
|
||||
Reference in New Issue
Block a user