mirror of
https://github.com/jomjol/AI-on-the-edge-device.git
synced 2025-12-11 22:16:56 +03:00
Revert "consolidate test-ip definition, added missing Access-Control-Allow-Origin,"
This reverts commit 56cfeb732e.
This commit is contained in:
@@ -50,22 +50,22 @@ p {font-size: 1em;}
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
<script type="text/javascript" src="common.js"></script>
|
||||
<script type="text/javascript" src="readconfig.js"></script>
|
||||
<script type="text/javascript" src="./gethost.js"></script>
|
||||
<script type="text/javascript" src="./readconfig.js"></script>
|
||||
|
||||
<script type="text/javascript">
|
||||
var domainname = getDomainname();
|
||||
var basepath = "http://192.168.178.26";
|
||||
|
||||
function doAnalog(){
|
||||
var xhttp = new XMLHttpRequest();
|
||||
url = domainname + "/editflow?task=test_analog";
|
||||
if (domainname.length > 0){
|
||||
url = url + "&host=" + domainname;
|
||||
url = basepath + "/editflow?task=test_analog";
|
||||
if (basepath.length > 0){
|
||||
url = url + "&host=" + basepath;
|
||||
}
|
||||
xhttp.open("GET", url, false);
|
||||
xhttp.send();
|
||||
var html = xhttp.responseText;
|
||||
html = html.replace("src=\"/", "src=\"" + domainname + "/");
|
||||
html = html.replace("src=\"/", "src=\"" + basepath + "/");
|
||||
|
||||
document.getElementById("maincontent").src = 'data:text/html,' + encodeURIComponent(html);
|
||||
}
|
||||
@@ -73,14 +73,14 @@ p {font-size: 1em;}
|
||||
|
||||
function doDigits(){
|
||||
var xhttp = new XMLHttpRequest();
|
||||
url = domainname + "/editflow?task=test_digits";
|
||||
if (domainname.length > 0){
|
||||
url = url + "&host=" + domainname;
|
||||
url = basepath + "/editflow?task=test_digits";
|
||||
if (basepath.length > 0){
|
||||
url = url + "&host=" + basepath;
|
||||
}
|
||||
xhttp.open("GET", url, false);
|
||||
xhttp.send();
|
||||
var html = xhttp.responseText;
|
||||
html = html.replace("src=\"/", "src=\"" + domainname + "/");
|
||||
html = html.replace("src=\"/", "src=\"" + basepath + "/");
|
||||
|
||||
document.getElementById("maincontent").src = 'data:text/html,' + encodeURIComponent(html);
|
||||
}
|
||||
@@ -88,14 +88,14 @@ p {font-size: 1em;}
|
||||
|
||||
function doAlign(){
|
||||
var xhttp = new XMLHttpRequest();
|
||||
url = domainname + "/editflow?task=test_align";
|
||||
if (domainname.length > 0){
|
||||
url = url + "&host=" + domainname;
|
||||
url = basepath + "/editflow?task=test_align";
|
||||
if (basepath.length > 0){
|
||||
url = url + "&host=" + basepath;
|
||||
}
|
||||
xhttp.open("GET", url, false);
|
||||
xhttp.send();
|
||||
var html = xhttp.responseText;
|
||||
html = html.replace("src=\"/", "src=\"" + domainname + "/");
|
||||
html = html.replace("src=\"/", "src=\"" + basepath + "/");
|
||||
|
||||
document.getElementById("maincontent").src = 'data:text/html,' + encodeURIComponent(html);
|
||||
|
||||
@@ -107,9 +107,9 @@ p {font-size: 1em;}
|
||||
|
||||
function doTake(){
|
||||
var xhttp = new XMLHttpRequest();
|
||||
url = domainname + "/editflow?task=test_take";
|
||||
if (domainname.length > 0){
|
||||
url = url + "&host=" + domainname;
|
||||
url = basepath + "/editflow?task=test_take";
|
||||
if (basepath.length > 0){
|
||||
url = url + "&host=" + basepath;
|
||||
}
|
||||
xhttp.open("GET", url, false);
|
||||
xhttp.send();
|
||||
@@ -122,7 +122,7 @@ p {font-size: 1em;}
|
||||
}
|
||||
|
||||
function Init(){
|
||||
domainname = getDomainname();
|
||||
basepath = getbasepath();
|
||||
document.getElementById("align").disabled = true;
|
||||
document.getElementById("digits").disabled = true;
|
||||
document.getElementById("analog").disabled = true;
|
||||
|
||||
Reference in New Issue
Block a user