From b524906723343c6840488286f80567b91b87ad9e Mon Sep 17 00:00:00 2001 From: peteruithoven Date: Fri, 18 Oct 2013 13:19:36 +0200 Subject: [PATCH] Also display ethernet cable connected box (192.168.5.1) --- index.html | 4 ++-- js/main.js | 5 +++++ 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/index.html b/index.html index 7b709e8..982a059 100644 --- a/index.html +++ b/index.html @@ -33,8 +33,8 @@

- Can't find your device? Make sure your on the same wifi network.
- You can always use an ethernet cable and go to 192.168.5.1. + Can't find your box? Make sure your on the same wifi network.
+ You can always connect your box to your computer using an ethernet cable.
diff --git a/js/main.js b/js/main.js index 13b2040..ea4e1b5 100644 --- a/js/main.js +++ b/js/main.js @@ -6,6 +6,8 @@ var boxTimeoutTime = 500; var numBoxesChecking = 0; // count how many boxes we are checking var numBoxesFound = 0; // count how many boxes responded +var connectedBox = {localip:"192.168.5.1",wifiboxid:"Connected WiFi box"}; + var $list; var $intro; var $hint; @@ -68,6 +70,8 @@ function updateList(boxes) { numBoxesChecking = 0; numBoxesFound = 0; + boxes.push(connectedBox); + // remove displayed, but unlisted boxes $list.find("a").each(function(index, element) { var localip = $(element).attr("id"); @@ -82,6 +86,7 @@ function updateList(boxes) { jQuery.each(boxes, function (index,box) { checkBox(box); }); + //checkBox(connectedBox); updateIntro(); } function checkBox(box) {