-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Gave Settings Navigation functionality
still need it to actually work, this'll involve python
- Loading branch information
Showing
7 changed files
with
880 additions
and
474 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
function settings(status) { | ||
var settingsmenu = document.getElementById("settings"); | ||
|
||
if (status == "show") { | ||
settingsmenu.classList.add("popup"); | ||
settingsmenu.classList.remove("popout"); | ||
} | ||
|
||
if (status == "hide") { | ||
settingsmenu.classList.remove("popup"); | ||
settingsmenu.classList.add("popout"); | ||
} | ||
} | ||
|
||
// Listen for messages from iframe | ||
window.addEventListener('message', function(event) { | ||
// Verify origin of the iframe (optional, for security) | ||
// if (event.origin !== 'https://your-iframe-domain.com') return; | ||
|
||
// Check the message received from iframe | ||
if (event.data === 'hideSettings') { | ||
// Call settings function in the parent window | ||
settings('hide'); | ||
} | ||
}); |
Oops, something went wrong.