1 let labels = ["网页默认字体族","cursive字体族","Fantasy字体族","Fixed字体族","Sans-Serif字体族","Serif字体族"];
2 let names = ["font","cursive","fantasy","fixed","sansserif","serif"];
7 text = d.body.innerHTML;
9 text = "\n".repeat(labels.length-1);
11 let sa = [`<style>input{height:40px;width:100%;border-radius:50px;}</style>
12 <datalist id="family">
13 <option value="sans-serif">
14 <option value="sans-serif-condensed">
15 <option value="sans-serif-smallcaps">
16 <option value="serif">
17 <option value="serif-monospace">
18 <option value="monospace">
19 <option value="cursive">
21 <form onsubmit="let d=document;let f=d.forms[0];d.location.href='i:0i/sdcard/uweb/config.html:'+f.font.value+
22 '&'+ f.cursive.value +
23 '&'+ f.fantasy.value +
25 '&'+ f.sansserif.value +
27 ':https://cdn.jsdelivr.net/gh/torappinfo/uwebzh/searchurl/template/config.html';return false;" accept-charset=utf-8 >`];
30 let strs = text.split('\n');
32 for (i = 0; i < labels.length; i++){
33 sa.push("<label>"+labels[i]+"<input list='family' type='text' name='"+names[i]+"' value='"+strs[i]+"'/></label>");
36 sa.push('<input type="submit" value="Save"></form>');
37 let r = sa.join('<br>');
38 d.documentElement.innerHTML = r;