Skip to content

Commit

Permalink
Readme
Browse files Browse the repository at this point in the history
  • Loading branch information
kaihendry committed Mar 8, 2012
1 parent 2d82c12 commit 7df9c26
Show file tree
Hide file tree
Showing 4 changed files with 25 additions and 10 deletions.
15 changes: 15 additions & 0 deletions README.md
@@ -0,0 +1,15 @@
# Simple Webconverger Neon demo controller

Configure [Neon](http://neon.webconverger.com/) **HTML sign** to demo site, e.g. http://demo3.webconverger.com

It should prompt you a URL you need to take another browser, to control what Website the sign shows.

# Demo

* http://demo.webconverger.com
* http://demo2.webconverger.com
* http://demo3.webconverger.com

# Limitations

https://developer.mozilla.org/en/The_X-FRAME-OPTIONS_response_header
2 changes: 1 addition & 1 deletion bigbox.css
Expand Up @@ -20,7 +20,7 @@ body {
left: 25%; left: 25%;
opacity: 0; opacity: 0;
filter: progid:DXImageTransform.Microsoft.Alpha(Opacity=0); filter: progid:DXImageTransform.Microsoft.Alpha(Opacity=0);
width: 50%; width: 70%;
min-height: 40px; min-height: 40px;
padding: 30px; padding: 30px;
text-align: center; text-align: center;
Expand Down
10 changes: 5 additions & 5 deletions index.cgi
Expand Up @@ -7,9 +7,9 @@ IFS='=&'
parm=($QUERY_STRING) parm=($QUERY_STRING)
IFS=$saveIFS IFS=$saveIFS


if test "${parm[0]}" == "macid" if test "${parm[0]}" == "mac"
then then
macid=$(/bin/busybox httpd -d "${parm[1]}") mac=$(/bin/busybox httpd -d "${parm[1]}")
fi fi


cat <<END cat <<END
Expand All @@ -34,8 +34,8 @@ Content-Type: text/html
</html> </html>
END END


if test "$macid" if test "$mac"
then then
mkdir -p $macid mkdir -p $mac
cp control.cgi $macid/index.cgi cp control.cgi $mac/index.cgi
fi fi
8 changes: 4 additions & 4 deletions main.js
Expand Up @@ -9,16 +9,16 @@ function getQueryVariable(variable) {
} }
} }


uniqueID = getQueryVariable("macid"); uniqueID = getQueryVariable("mac");
humane.timeout = 0; humane.timeout = 0;
if (uniqueID) { if (uniqueID) {
humane.info("Control this demo by going to http://" + window.location.hostname + "/" + uniqueID); humane.info("Control this demo by going to http://" + window.location.hostname + "/\n" + uniqueID);
setInterval(function() { setInterval(function() {
var nocache = Math.random(); var nocache = Math.random();
var script = document.createElement('script') var script = document.createElement('script')
script.src = uniqueID + "/main.js?" + nocache; script.src = uniqueID + "/main.js?" + nocache;
document.body.appendChild(script) document.body.appendChild(script)
}, 2000); }, 3000);
} else { } else {
humane.error("Please specify a /?macid= query"); humane.error("Please specify a /?mac= query");
} }

0 comments on commit 7df9c26

Please sign in to comment.