Create index.js
This commit is contained in:
parent
14e5155f75
commit
6af067d652
22
js/index.js
Normal file
22
js/index.js
Normal file
|
@ -0,0 +1,22 @@
|
|||
$(function() {
|
||||
|
||||
// Set the command-line prompt to include the user's IP Address
|
||||
//$('.prompt').html('[' + codehelper_ip["IP"] + '@HTML5] # ');
|
||||
$('.prompt').html('[user@HTML5] # ');
|
||||
|
||||
// Initialize a new terminal object
|
||||
var term = new Terminal('#input-line .cmdline', '#container output');
|
||||
term.init();
|
||||
|
||||
// Update the clock every second
|
||||
setInterval(function() {
|
||||
function r(cls, deg) {
|
||||
$('.' + cls).attr('transform', 'rotate('+ deg +' 50 50)')
|
||||
}
|
||||
var d = new Date()
|
||||
r("sec", 6*d.getSeconds())
|
||||
r("min", 6*d.getMinutes())
|
||||
r("hour", 30*(d.getHours()%12) + d.getMinutes()/2)
|
||||
}, 1000);
|
||||
|
||||
});
|
Loading…
Reference in a new issue