revert to use pathname

This commit is contained in:
James Feng Cao 2022-10-12 22:41:45 +08:00
parent ddcf396b11
commit eb30780475
2 changed files with 13 additions and 5 deletions

View file

@ -171,10 +171,9 @@
$(dictinput).on('change', accept);
{
let href = location.href;
let iQ = href.indexOf('?');
let iSlash = path.lastIndexOf('/',iQ-1);
let filenames=path.substring(iSlash+1,iQ);
let path = location.pathname;
let iSlash = path.lastIndexOf('/');
let filenames=path.substring(iSlash+1);
{
let iDot = filenames.indexOf('.');
if(iDot>0)