usablica / intro.js

Lightweight, user-friendly onboarding tour library
http://introjs.com
Other
22.69k stars 2.59k forks source link

cookie local storage #1997

Closed Arashturk closed 4 months ago

Arashturk commented 11 months ago

hi I use blow code to storage user action:

`var intro = introJs().setOptions({ nextLabel: 'Nex', prevLabel: 'Pre', skipLabel: "×", doneLabel: 'finish', hidePrev: true, hideNext: false,

steps: [ { element: document.querySelector("tourelement"), title: 'title', intro: "test for testttttt", }, ] }).oncomplete(() => document.cookie = "intro-complete=true");

intro.oncomplete(() => document.cookie = "intro-complete=true");

var start = () => intro.start();

if (document.cookie.split(";").indexOf("intro-complete=true") < 0) window.setTimeout(start, 1000);`

my problem is that when I click on finish and refresh the page, the tour is displayed again.

please help me

stale[bot] commented 7 months ago

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.