Last active
December 12, 2019 22:35
-
-
Save kennethkoontz/e2cf10d84e4f7aa672307d6aa9ee4863 to your computer and use it in GitHub Desktop.
This file contains 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
// in the index.html | |
<script> | |
(function () { | |
var NickelledLaunchers = window['NickelledLaunchers'] = NickelledLaunchers || {}; | |
NickelledLaunchers.preloadEvents = []; | |
NickelledLaunchers.show = function () { | |
NickelledLaunchers.preloadEvents.push('show'); | |
}; | |
NickelledLaunchers.hide = function () { | |
NickelledLaunchers.preloadEvents.push('hide'); | |
}; | |
(function () { | |
var s, f; | |
s = document.createElement("script"); | |
s.async = true; | |
s.src = "https://cdn.nickelled.com/launchers.min.js"; | |
f = document.getElementsByTagName("script")[0]; | |
f.parentNode.insertBefore(s, f); | |
})(); | |
})(); | |
</script> | |
// in the component where i have access to user.id | |
window['NickelledSettings'] = { | |
userId: user.id, | |
}; | |
window['NickelledLaunchers']._init(); | |
window['NickelledLaunchers'].show(); | |
// in the corresponding html | |
<div data-nickelled-launcher="auto-launch" data-guide="https://benchmark.nickelled.com/welcome" data-limit="1"></div> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment