use store instead of localStorage to detect whether the intro has been shown
This commit is contained in:
parent
b40278f4dc
commit
6fe689dc17
|
@ -273,12 +273,12 @@
|
||||||
<script>
|
<script>
|
||||||
var clipboard = new ClipboardJS('.clipboard');
|
var clipboard = new ClipboardJS('.clipboard');
|
||||||
|
|
||||||
var introShown = localStorage.getItem("introShown");
|
var introShown = store.get("introShown");
|
||||||
if ("yes" !== introShown) {
|
if ("yes" !== introShown) {
|
||||||
// only show intro when screen is big enough to show "developer" tab
|
// only show intro when screen is big enough to show "developer" tab
|
||||||
if (window.innerWidth >= 1024) {
|
if (window.innerWidth >= 1024) {
|
||||||
introJs().start();
|
introJs().start();
|
||||||
localStorage.setItem("introShown", "yes")
|
store.set("introShown", "yes")
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -170,11 +170,12 @@
|
||||||
|
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
|
<script src="/static/local-storage-polyfill.js"></script>
|
||||||
|
|
||||||
<!-- For additional script -->
|
<!-- For additional script -->
|
||||||
{% block script %}
|
{% block script %}
|
||||||
{% endblock %}
|
{% endblock %}
|
||||||
|
|
||||||
<script src="/static/local-storage-polyfill.js"></script>
|
|
||||||
<script>
|
<script>
|
||||||
(function () {
|
(function () {
|
||||||
// only enable on prod
|
// only enable on prod
|
||||||
|
|
Loading…
Reference in a new issue