2022-05-08 00:28:53 +00:00
|
|
|
let labels = ["网页默认字体族","cursive字体族","Fantasy字体族","Fixed字体族","Sans-Serif字体族","Serif字体族"];
|
|
|
|
let names = ["font","cursive","fantasy","fixed","sansserif","serif"];
|
2021-09-18 15:49:36 +00:00
|
|
|
|
2021-08-22 03:21:57 +00:00
|
|
|
let d=document;
|
|
|
|
|
2021-09-20 12:00:28 +00:00
|
|
|
let sa = [`<style>input{height:40px;width:100%;border-radius:50px;}</style>
|
|
|
|
<datalist id="family">
|
|
|
|
<option value="sans-serif">
|
|
|
|
<option value="sans-serif-condensed">
|
|
|
|
<option value="sans-serif-smallcaps">
|
|
|
|
<option value="serif">
|
|
|
|
<option value="serif-monospace">
|
|
|
|
<option value="monospace">
|
|
|
|
<option value="cursive">
|
|
|
|
</datalist>
|
2022-07-09 00:45:17 +00:00
|
|
|
<form onsubmit="let d=document;let f=d.forms[0];d.location.href='i:0i/data/data/info.torapp.uweb/files/config.html:'+f.font.value+
|
2021-08-25 15:23:25 +00:00
|
|
|
'&'+ f.cursive.value +
|
|
|
|
'&'+ f.fantasy.value +
|
|
|
|
'&'+ f.fixed.value +
|
|
|
|
'&'+ f.sansserif.value +
|
|
|
|
'&'+ f.serif.value +
|
2022-08-12 03:37:01 +00:00
|
|
|
':https://fastly.jsdelivr.net/gh/torappinfo/uweb/searchurl/template/config.html';return false;" accept-charset=utf-8 >`];
|
2021-08-22 03:21:57 +00:00
|
|
|
|
2022-12-16 09:48:23 +00:00
|
|
|
function gen(text) {
|
|
|
|
let strs = text.split('\n');
|
|
|
|
let i=0;
|
|
|
|
for (i = 0; i < labels.length; i++){
|
|
|
|
sa.push("<label>"+labels[i]+"<input list='family' type='text' name='"+names[i]+"' value='"+strs[i]+"'/></label>");
|
|
|
|
}
|
2021-08-22 03:21:57 +00:00
|
|
|
|
2022-12-16 09:48:23 +00:00
|
|
|
sa.push('<input type="submit" value="Save"></form>');
|
|
|
|
let r = sa.join('<br>');
|
|
|
|
d.documentElement.innerHTML = r;
|
2021-08-22 03:21:57 +00:00
|
|
|
}
|
2022-05-08 00:05:26 +00:00
|
|
|
|
2022-12-16 09:48:23 +00:00
|
|
|
if(d.body){
|
|
|
|
fetch(location.href)
|
|
|
|
.then(res => res.text())
|
|
|
|
.then(text => {
|
|
|
|
gen(text);
|
|
|
|
});
|
|
|
|
}else {
|
|
|
|
let text = "\n".repeat(labels.length-1);
|
|
|
|
gen(text);
|
|
|
|
}
|