mirror of
https://github.com/tcsenpai/Zundler.git
synced 2025-06-04 18:45:27 +00:00
Add logic for a menu
This commit is contained in:
parent
1df42864cd
commit
2a8cbc75c8
@ -124,3 +124,12 @@ window.addEventListener("message", (evnt) => {
|
||||
window.parent.postMessage({
|
||||
action: "ready",
|
||||
}, '*');
|
||||
|
||||
|
||||
document.addEventListener('keyup', function (event) {
|
||||
if (event.key == "Z" && event.ctrlKey){
|
||||
window.parent.postMessage({
|
||||
action: "showMenu",
|
||||
}, '*');
|
||||
}
|
||||
});
|
||||
|
@ -181,6 +181,8 @@ window.onload = function() {
|
||||
if (evnt.data.action == 'ready') {
|
||||
hideLoadingIndicator();
|
||||
|
||||
} else if (evnt.data.action == 'showMenu') {
|
||||
showMenu();
|
||||
} else if (evnt.data.action == 'set_title') {
|
||||
// iframe has finished loading and sent us its title
|
||||
// parent sets the title and responds with the globalContext object
|
||||
@ -232,3 +234,13 @@ var hideLoadingIndicator = function() {
|
||||
var loading = document.getElementById('loading-indicator');
|
||||
loading.style.display = 'none';
|
||||
}
|
||||
|
||||
function showMenu() {
|
||||
// TODO show the menu containing info and functions
|
||||
}
|
||||
|
||||
document.addEventListener('keyup', function (event) {
|
||||
if (event.key == "Z" && event.ctrlKey){
|
||||
showMenu();
|
||||
}
|
||||
});
|
||||
|
Loading…
x
Reference in New Issue
Block a user