Skip to content
intro.js 966 B
Newer Older
Pierre Ozoux's avatar
Pierre Ozoux committed
var path = window.location.pathname.replace(/\/index\.php/, '')
var options = {};
var run = false;
var oncomplete = function() {
}

var file = {
  steps: [{
    title: 'Welcome on files!',
    intro: 'Hello World! 👋'
  },
  {
    element: document.querySelector('.avatardiv'),
    intro: 'This step focuses on the avatar'
  },
  {
    title: 'Farewell!',
    intro: 'And this is our final step!'
  }]
}

var settings = {
  steps: [{
    title: 'Welcome on settings/user!',
    intro: 'Hello World! 👋'
  },
  {
    element: document.querySelector('.avatardiv'),
    intro: 'This step focuses on the avatar'
  },
  {
    title: 'Farewell!',
    intro: 'And this is our final step!'
  }]
}


switch(path){
  case "/apps/files/":
    options = file;
    run = true;
    oncomplete = function() {
      setStatus(0);
    }
  case "/settings/user":
    options = settings;
    run = true;
}

if(run){
  introJs().setOptions(options).oncomplete(oncomplete).start();
}