use store instead of localStorage to detect whether the intro has been shown

This commit is contained in:
Son NK 2020-02-05 14:33:00 +07:00
parent b40278f4dc
commit 6fe689dc17
2 changed files with 4 additions and 3 deletions

View file

@ -273,12 +273,12 @@
<script>
var clipboard = new ClipboardJS('.clipboard');
var introShown = localStorage.getItem("introShown");
var introShown = store.get("introShown");
if ("yes" !== introShown) {
// only show intro when screen is big enough to show "developer" tab
if (window.innerWidth >= 1024) {
introJs().start();
localStorage.setItem("introShown", "yes")
store.set("introShown", "yes")
}
}

View file

@ -170,11 +170,12 @@
</script>
<script src="/static/local-storage-polyfill.js"></script>
<!-- For additional script -->
{% block script %}
{% endblock %}
<script src="/static/local-storage-polyfill.js"></script>
<script>
(function () {
// only enable on prod