1
0
Fork 1
mirror of https://example.com synced 2024-11-27 04:36:38 +09:00

Improve readability

This commit is contained in:
syuilo 2017-02-18 13:26:27 +09:00
parent fde6ed6073
commit cedeba580e

View file

@ -11,10 +11,12 @@ module.exports = me => {
openPostForm: opts => {
const app = document.getElementById('app');
app.style.display = 'none';
const form = riot.mount(document.body.appendChild(document.createElement('mk-post-form')), opts)[0];
function recover() {
app.style.display = 'block';
}
const form = riot.mount(document.body.appendChild(document.createElement('mk-post-form')), opts)[0];
form
.on('cancel', recover)
.on('post', recover);