mirror of
https://github.com/torappinfo/uweb.git
synced 2024-08-14 23:54:59 +00:00
rebuilding Sat Sep 10 07:25:14 PM CST 2022
This commit is contained in:
parent
e82c754b00
commit
0728ce81f7
1 changed files with 12 additions and 13 deletions
|
@ -78,27 +78,26 @@
|
||||||
let dictinput = document.getElementById('dictfile');
|
let dictinput = document.getElementById('dictfile');
|
||||||
let wordinput = document.getElementById('word');
|
let wordinput = document.getElementById('word');
|
||||||
let btnLookup = document.getElementById('btnLookup');
|
let btnLookup = document.getElementById('btnLookup');
|
||||||
let v = location.hash.substring(6);
|
|
||||||
wordinput.value = v;
|
|
||||||
window.onhashchange = function() {
|
|
||||||
let v = location.hash.substring(6);
|
|
||||||
if(v.length>0){
|
|
||||||
wordinput.value = v;
|
|
||||||
//wordinput.dispatchEvent(new Event('change', {'bubbles': true}));
|
|
||||||
btnLookup.click();
|
|
||||||
}
|
|
||||||
};
|
|
||||||
|
|
||||||
//dictinput.onClick = {(e)=>{e.target.value="";}};
|
|
||||||
window.onload = function() {
|
window.onload = function() {
|
||||||
|
let v = location.hash.substring(6);
|
||||||
|
wordinput.value = v;
|
||||||
|
|
||||||
let filenames = location.search.substring(6);
|
let filenames = location.search.substring(6);
|
||||||
if(filenames.length>0){
|
if(filenames.length>0){
|
||||||
dictinput.setAttribute('accept',filenames);
|
dictinput.setAttribute('accept',filenames);
|
||||||
location.href="i:5fdictinput.click()";
|
location.href="i:5fdictinput.click()";
|
||||||
//setTimeout(()=>{location.href="i:5fdictinput.click();"},100);
|
|
||||||
//setTimeout(()=>{location.href="i:5fdictinput.click();"},300);
|
|
||||||
setTimeout(()=>{dictinput.dispatchEvent(new Event('change'));dictinput.removeAttribute('accept')},500);
|
setTimeout(()=>{dictinput.dispatchEvent(new Event('change'));dictinput.removeAttribute('accept')},500);
|
||||||
}
|
}
|
||||||
|
window.onhashchange = function() {
|
||||||
|
let v = location.hash.substring(6);
|
||||||
|
if(v.length>0){
|
||||||
|
wordinput.value = v;
|
||||||
|
//wordinput.dispatchEvent(new Event('change', {'bubbles': true}));
|
||||||
|
btnLookup.click();
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
</body>
|
</body>
|
||||||
|
|
Loading…
Reference in a new issue