define([ "jquery", "classes/Extension", "bootstrap-tour" ], function($, Extension) { var welcomeTour = new Extension("welcomeTour", "Welcome tour", false, true); welcomeTour.onReady = function() { var tour = new Tour({ storage: { getItem: function() { }, setItem: function() { }, removeItem: function() { } }, onEnd: function(tour) { localStorage.welcomeTour = "done"; }, template: [ "
", "
", "

", "
", " ", "
" ].join('') }); tour.addSteps([ { element: ".navbar-inner", title: "Welcome to StackEdit", content: "Please click Next to take a quick tour.", placement: "bottom", }, { element: ".navbar .action-create-file", title: "New document", content: "Click the New document button to create a new document.", placement: "left", reflex: true, }, { element: ".document-panel .collapse-button", title: "Toggle document", content: [ "

Click the Select document button to switch to another document.

", "NOTE: Use Ctrl+[ and Ctrl+] shortcuts to toggle quickly." ].join(''), placement: "left", reflex: true, }, { element: ".menu-panel .collapse-button", title: "Menu", content: [ "

Use the menu to synchronize your document on Google Drive or Dropbox.

", "Use also this menu to publish your document on GitHub, Blogger..." ].join(''), placement: "right", reflex: true, }, { element: "#extension-buttons button:first", title: "Synchronize/publish", content: [ "

Once imported/exported, use the Synchronize button to force the synchronization (this is done automatically every 3 minutes).

", "Use also the Publish button to update your publications." ].join(''), placement: "bottom", reflex: true, }, ]); if(!_.has(localStorage, 'welcomeTour')) { tour.start(); } $('.action-welcome-tour').click(function() { tour.restart(); }); }; return welcomeTour; });