From 6af067d652541d9218d2d79110fe0df4c647c99b Mon Sep 17 00:00:00 2001 From: Innovation Inc Date: Tue, 23 Apr 2019 10:03:10 -0500 Subject: [PATCH] Create index.js --- js/index.js | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) create mode 100644 js/index.js diff --git a/js/index.js b/js/index.js new file mode 100644 index 0000000..eeda331 --- /dev/null +++ b/js/index.js @@ -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); + +});