mirror of
				https://github.com/zulip/zulip.git
				synced 2025-11-04 05:53:43 +00:00 
			
		
		
		
	This commit prepares the frontend code to be consumed by webpack. It is a hack: In theory, modules should be declaring and importing the modules they depend on and the globals they expose directly. However, that requires significant per-module work, which we don't really want to block moving our toolchain to webpack on. So we expose the modules by setting window.varName = varName; as needed in the js files.
		
			
				
	
	
		
			26 lines
		
	
	
		
			569 B
		
	
	
	
		
			JavaScript
		
	
	
	
	
	
			
		
		
	
	
			26 lines
		
	
	
		
			569 B
		
	
	
	
		
			JavaScript
		
	
	
	
	
	
var tutorial = (function () {
 | 
						|
 | 
						|
var exports = {};
 | 
						|
 | 
						|
function set_tutorial_status(status, callback) {
 | 
						|
    return channel.post({
 | 
						|
        url:      '/json/users/me/tutorial_status',
 | 
						|
        data:     {status: JSON.stringify(status)},
 | 
						|
        success:  callback,
 | 
						|
    });
 | 
						|
}
 | 
						|
 | 
						|
exports.initialize = function () {
 | 
						|
    if (page_params.needs_tutorial) {
 | 
						|
        set_tutorial_status("started");
 | 
						|
        narrow.by('is', 'private', {trigger: 'sidebar'});
 | 
						|
    }
 | 
						|
};
 | 
						|
 | 
						|
return exports;
 | 
						|
}());
 | 
						|
if (typeof module !== 'undefined') {
 | 
						|
    module.exports = tutorial;
 | 
						|
}
 | 
						|
window.tutorial = tutorial;
 |