Closed bluesidra closed 6 months ago
I modified the API so you would call it as follows:
const readAloudID = "hdhinadidafjejdhmfkjgnolgimiaplp";
document.addEventListener('Read Command', function (e) {
const data = {method:"play", text:e.detail};
chrome.runtime.sendMessage(readAloudID, {message: data});
});
Added code to make ReadAloud able to listen to external messages/command. It listens to all messages that start with "play ", "pause", "stop", "resume" and execute the corresponding command. Example message:
"play ReadAloud is awesome!"
If ReadAloud receives this message, it would lead to it reading "ReadAloud is awesome!"Example for calling ReadAloud from a different extension's content script:
Only for Chrome, bc using "browser" yielded an error :( (Sorry for any gihub or coding screw-ups, I'm fairly new to all of it)