Last active
December 2, 2017 14:49
-
-
Save asticode/a12eaf74114cc008a6e05e0585514b6f to your computer and use it in GitHub Desktop.
This file contains hidden or 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
| 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