代码拉取完成,页面将自动刷新
同步操作将从 hvwyl/circuitjs1-zh 强制同步,此操作会覆盖自 Fork 仓库以来所做的任何修改,且无法恢复!!!
确定后同步将在后台操作,完成时将刷新页面,请耐心等待。
<!DOCTYPE html>
<html>
<head>
<!-- Properties can be specified to influence deferred binding -->
<meta name='gwt:property' content='locale=en_UK'>
<!-- Titles are optional, but useful -->
<title></title>
</head>
<body>
<h1>Blink Test</h1>
<h2 name="fname">LCR</h2>
<iframe name="local" src="http://127.0.0.1:8888/circuitjs.html" width=49% height=700px></iframe>
<iframe name="remote" src="https://lushprojects.com/circuitjs/circuitjs.html" width=49% height=700px></iframe>
<button onclick="next()">Next File</button>
<br>
<input type="text" id="fname" value="">
<button onclick="load()">Load File</button>
<script>
var lines;
var request = new XMLHttpRequest();
var files = [];
var ptr = 0;
function setScr(msg, fname) {
document.getElementsByName("local")[0].src = "http://127.0.0.1:8888/circuitjs.html?startCircuit="+fname;
document.getElementsByName("remote")[0].src = "https://lushprojects.com/circuitjs/circuitjs.html?startCircuit="+fname;
document.getElementsByName("fname")[0].innerHTML= msg+" "+fname;
}
function next() {
if (ptr<files.length-1) {
ptr++;
}
setScr(String(ptr+1)+" of "+String(files.length-1), files[ptr]);
}
function load() {
var x = document.getElementById("fname").value;
setScr("", x);
}
request.open('GET', '/circuitjs1/setuplist.txt', false); // `false` makes the request synchronous
request.send(null);
console.log(request.status);
if (request.status === 200) {
console.log("processing text");
lines=request.responseText.split('\n');
for(var line =0; line < lines.length; line++) {
var res = lines[line].match(/^([a-zA-Z0-9\-]+\.txt)/g); // Match lines starting with filename.txt
if (res!=null) {
files.push(res[0]);
}
}
console.log(files);
setScr("1", files[0]);
}
</script>
</body>
</html>
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。