From eb307804756626ab662cb778b15ba4977f93b69e Mon Sep 17 00:00:00 2001 From: James Feng Cao Date: Wed, 12 Oct 2022 22:41:45 +0800 Subject: [PATCH] revert to use pathname --- en/searchurl/mdict/mdict.html | 7 +++---- index.html | 11 ++++++++++- 2 files changed, 13 insertions(+), 5 deletions(-) diff --git a/en/searchurl/mdict/mdict.html b/en/searchurl/mdict/mdict.html index ed3b0b9..5cf8837 100644 --- a/en/searchurl/mdict/mdict.html +++ b/en/searchurl/mdict/mdict.html @@ -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) diff --git a/index.html b/index.html index db7d507..33185bf 100644 --- a/index.html +++ b/index.html @@ -1 +1,10 @@ - + + + + en/ + + + + + +