Skip to content

Instantly share code, notes, and snippets.

@kennethkoontz
Last active December 12, 2019 22:35
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save kennethkoontz/e2cf10d84e4f7aa672307d6aa9ee4863 to your computer and use it in GitHub Desktop.
Save kennethkoontz/e2cf10d84e4f7aa672307d6aa9ee4863 to your computer and use it in GitHub Desktop.
// 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