mirror of
https://github.com/tcsenpai/Zundler.git
synced 2025-06-06 11:35:40 +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({
|
window.parent.postMessage({
|
||||||
action: "ready",
|
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') {
|
if (evnt.data.action == 'ready') {
|
||||||
hideLoadingIndicator();
|
hideLoadingIndicator();
|
||||||
|
|
||||||
|
} else if (evnt.data.action == 'showMenu') {
|
||||||
|
showMenu();
|
||||||
} else if (evnt.data.action == 'set_title') {
|
} else if (evnt.data.action == 'set_title') {
|
||||||
// iframe has finished loading and sent us its title
|
// iframe has finished loading and sent us its title
|
||||||
// parent sets the title and responds with the globalContext object
|
// parent sets the title and responds with the globalContext object
|
||||||
@ -232,3 +234,13 @@ var hideLoadingIndicator = function() {
|
|||||||
var loading = document.getElementById('loading-indicator');
|
var loading = document.getElementById('loading-indicator');
|
||||||
loading.style.display = 'none';
|
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