2013-04-12 21:33:00 +02:00
|
|
|
function set_tutorial_status(status, callback) {
|
2013-12-18 19:55:18 +01:00
|
|
|
return channel.post({
|
2018-12-18 19:34:45 +01:00
|
|
|
url: '/json/users/me/tutorial_status',
|
|
|
|
data: {status: JSON.stringify(status)},
|
|
|
|
success: callback,
|
2013-04-12 21:33:00 +02:00
|
|
|
});
|
|
|
|
}
|
|
|
|
|
2013-02-13 22:15:13 +01:00
|
|
|
exports.initialize = function () {
|
2013-03-25 23:26:14 +01:00
|
|
|
if (page_params.needs_tutorial) {
|
2017-08-31 18:20:03 +02:00
|
|
|
set_tutorial_status("started");
|
2018-04-23 06:02:11 +02:00
|
|
|
narrow.by('is', 'private', {trigger: 'sidebar'});
|
2013-02-13 22:15:13 +01:00
|
|
|
}
|
|
|
|
};
|
|
|
|
|
2019-10-25 09:45:13 +02:00
|
|
|
window.tutorial = exports;
|