Skip to content

henrikedberg/xmas-console

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

75 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

xmas-console

Web based xmas console to keep the raindeers at bay

Example command-module:

define(['modules/output', 'modules/chat'], function(output, chat){
	
	// call output.print(message) to display things
	// call chat.send(message) to message other users 

	var Command = function() {
		// init instance
	};

	Command.prototype.run = function(/* string[] */ args) {
		output.print('running command with args:' + args.join(', ') );
	};

	return Command;
});

Example is available as a gist.
gists in sublime text

Using the modules

output

output.print(/* string */ msg); // output something to command line

output.clear(); // clear previous outputs

var bgEl = output.getFullscreenBackgroundElement(); // get reference to html-element
var fgEl = output.getFullscreenForegroundElement(); // to do with as you wish

chat

chat.user.name; // get user's name

chat.getUsers(); // get names of all connected users

chat.send(/*string*/ msg); // send message to all users

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • JavaScript 100.0%