mirror of
https://github.com/torappinfo/uweb.git
synced 2025-01-15 16:40:57 +01:00
18 lines
709 B
JavaScript
18 lines
709 B
JavaScript
let text = "";
|
|
let d=document;
|
|
if(d.body)
|
|
text = d.body.innerHTML;
|
|
|
|
let labels = ["Default font"];
|
|
let names = ["font"];
|
|
let sa = [`<script>function g(){let f=d.forms[0];d.location.href='i:0i/sdcard/uweb/config.html:'+f.font.value+':http://cdn.jsdelivr.net/gh/torappinfo/uwebzh/searchurl/template/config.html';}<\/script><style>input{height:40px;width:100%;border-radius:50px;}</style><form onsubmit='return g();'>`];
|
|
|
|
|
|
let strs = text.split('\n');
|
|
for (let i = 0; i < labels.length; i++){
|
|
sa.push("<label>"+labels[i]+"<input type='text' name='"+names[i]+"' value='"+strs[i]+"'/></label>");
|
|
}
|
|
sa.push('<input type="submit" value="Save"></form>');
|
|
let r = sa.join('<br>');
|
|
d.documentElement.innerHTML = r;
|