mirror of
https://github.com/KevinMidboe/zoff.git
synced 2025-10-29 18:00:23 +00:00
Now accepting all lower and reset volume
This commit is contained in:
11
embed.html
11
embed.html
@@ -8,17 +8,6 @@
|
||||
<script>
|
||||
function receiveMessage(event)
|
||||
{
|
||||
// Do we trust the sender of this message?
|
||||
if (event.origin !== "http://etys.no")
|
||||
return;
|
||||
|
||||
// event.source is window.opener
|
||||
// event.data is "hello there!"
|
||||
|
||||
// Assuming you've verified the origin of the received message (which
|
||||
// you must do in any case), a convenient idiom for replying to a
|
||||
// message is to call postMessage on event.source and provide
|
||||
// event.origin as the targetOrigin.
|
||||
if(event.data == "lower") {
|
||||
window.setVolume(10);
|
||||
}else if(event.data == "reset") {
|
||||
|
||||
Reference in New Issue
Block a user