diff --git a/index.html b/index.html
index 9b03939..eb87081 100644
--- a/index.html
+++ b/index.html
@@ -9,17 +9,42 @@
- Moonlight
- Status: NO-STATUS
- Moonlight Streaming extension for Chrome
+
+
Moonlight Streaming
+ Chrome App Status: NO-STATUS
+
- Click the buttons. Click them.
-
-
-
- Enter the IP or Hostname of the GFE streaming computer, then hit enter:
+ Enter the IP/hostname of the GFE streaming computer, or select one from the history:
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
Select a game to run
+
+
+
+
+
+
diff --git a/index.js b/index.js
index cf63c58..fe04e23 100644
--- a/index.js
+++ b/index.js
@@ -2,25 +2,29 @@
function attachListeners() {
document.getElementById('startButton').addEventListener('click', startPushed);
document.getElementById('stopButton').addEventListener('click', stopPushed);
+ document.getElementById('pairButton').addEventListener('click', pairPushed);
+ document.getElementById('showAppsButton').addEventListener('click', showAppsPushed);
}
-function getGFEHostIPField() {
- return document.getElementById('GFEHostIPField');
+function pairPushed() {
+ common.naclModule.postMessage('pair:' + document.getElementById('GFEHostIPField').value);
+}
+
+function showAppsPushed() {
+ common.naclModule.postMessage('showAppsPushed');
+ document.getElementById("gameSelectionDiv").style.display = "visible";
}
function startPushed() {
- common.naclModule.postMessage('setGFEHostIPField:' + getGFEHostIPField().value);
- //common.naclModule.postMessage('startPushed');
+ common.naclModule.postMessage('setGFEHostIPField:' + document.getElementById('GFEHostIPField').value);
}
function stopPushed() {
common.naclModule.postMessage('stopPushed');
}
-// Called by the common.js module.
+// hook from main.cpp into the javascript
function handleMessage(msg) {
var logEl = document.getElementById('GFEHostIPField');
logEl.value = msg.data;
}
-
-// chrome.app.window.current().fullscreen();
\ No newline at end of file