Commit 7ca92a9e authored by Craig Earley's avatar Craig Earley
Browse files

basic html and js for the user-facing side

parent 09daa4fc
var startTime;
var stopTime;
var duration;
var starturl;
var stopurl;
var markers = [];
function eventInit() {
var deferred = $.Deferred();
console.log("Setting up");
return deferred;
/* parse the URL, handle problems with it, do exception handling, etc. */
function checkURL(url_start){
new_url = "https://" + url_start;
return new_url;
/* wrapper for the timing function in case it needs modified */
function timestamp(){
$(window).load(function() {
startTime = timestamp();
start_url = $("#input-text").val();
//a lot to check in the URL, but for now assume it's good
start_url = checkURL(start_url);;
// if (start_url.toLowerCase() == "advogados"){
// window.location.href = "";}
// else{console.log("entered: " + start_url);}
stopTime = timestamp();
duration = stopTime-startTime;
console.log("started " + startTime);
console.log("stopped " + stopTime);
console.log("duration " + duration + " ms");
// $("#reset-button").click(resetform);
<!DOCTYPE html>
<link rel="stylesheet" type="text/css" href="css/style.css">
<script src="js/lib/jquery-2.1.4.min.js"></script>
<script src="js/lib/bootstrap.min.js"></script>
<script src="js/lib/chosen.jquery.min.js"></script>
<script src="js/lib/leaflet.js"></script>
<script src="js/lib/flot.all.min.js"></script>
<script src="js/lib/hashids.min.js"></script>
<script src="js/lib/jquery-ui.min.js"></script>
<script src="js/lib/jquery.multiselect.js"></script>
<script src="js/user.js"></script>
Should be some JavaScript:
- on click:
-- open url
-- note start time
-- wait
-- check url with every new url
-- when stop url: note stop time, display alert, stop tracking
<h1>User-Side Interface</h1>
<p>Your URL:</p>
<input name="paragraph_text" id="input" cols="50" rows="10"></textarea>
<form id="input-form" method="get">
Your URL:<input type="text" id="input-text" cols="50" rows="10"/><br>
<input type="button" id="user-button" value="Start Test"></button>
<!--button type="button" id="reset-button" value="Reset"></button-->
<button type="button" onclick="'').style.display='block'">Start Test!</button>
<input type="reset">
......@@ -60,3 +56,4 @@ $("#go_to_url").on("submit", function(event){
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment