Skip to content

Instantly share code, notes, and snippets.

@asticode
Last active December 2, 2017 14:49
Show Gist options
  • Select an option

  • Save asticode/a12eaf74114cc008a6e05e0585514b6f to your computer and use it in GitHub Desktop.

Select an option

Save asticode/a12eaf74114cc008a6e05e0585514b6f to your computer and use it in GitHub Desktop.
let index = {
about: function(html) {
let c = document.createElement("div");
c.innerHTML = html;
asticode.modaler.setContent(c);
asticode.modaler.show();
},
init: function() {
// Wait for astilectron to be ready
document.addEventListener('astilectron-ready', function() {
// Listen
index.listen();
})
},
listen: function() {
astilectron.onMessage(function(message) {
switch (message.name) {
case "about":
index.about(message.payload);
return {payload: "payload"};
break;
case "check.out.menu":
asticode.notifier.info(message.payload);
break;
}
});
}
};
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment