Created
March 30, 2016 15:53
-
-
Save sbellity/74c28f7846822b9d4df2e4494261579a to your computer and use it in GitHub Desktop.
Display modal on page load and force reopen it on closed
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
window.hullAsyncInit = function() { | |
function showDialog() { | |
setTimeout(function() { | |
if (!Hull.currentUser()) { | |
Hull.emit('hull.login.showDialog'); | |
} | |
}, 500); | |
} | |
// Show dialog on page load | |
Hull.on('hull.ships.ready', showDialog) | |
// Reopen dialog when it's closed | |
Hull.on('hull.login.dialogHidden', showDialog) | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment