rebuilding site Mon Sep 6 08:11:47 PM CST 2021
[uweb.git] / searchurl / config.js
blob73babd5deee07cc0de1850a58322f5b3516a29b5
1 let text = "";
2 let d=document;
3 if(d.body)
4   text = d.body.innerHTML;
6 let labels = ["网页默认字体族","cursive字体族","Fantasy字体族","Fixed字体族","Sans-Serif字体族","Serif字体族"];
7 let names = ["font","cursive","fantasy","fixed","sansserif","serif"];
8 let sa = [`<style>input{height:40px;width:100%;border-radius:50px;}</style><form onsubmit="let d=document;let f=d.forms[0];d.location.href='i:0i/sdcard/uweb/config.html:'+f.font.value+
9 '&'+ f.cursive.value +
10 '&'+ f.fantasy.value +
11 '&'+ f.fixed.value +
12 '&'+ f.sansserif.value +
13 '&'+ f.serif.value +
14 ':https://cdn.jsdelivr.net/gh/torappinfo/uwebzh/searchurl/template/config.html';return false;" accept-charset=utf-8 >`];
17 let strs = text.split('\n');
18 for (let i = 0; i < labels.length; i++){
19   sa.push("<label>"+labels[i]+"<input type='text' name='"+names[i]+"' value='"+strs[i]+"'/></label>");
21 sa.push('<input type="submit" value="Save"></form>');
22 let r = sa.join('<br>');
23 d.documentElement.innerHTML = r;