Skip to content

Commit

Permalink
fix(router): match URL without query or hash for preventing bugs. (#101)
Browse files Browse the repository at this point in the history
resoves #101
  • Loading branch information
maxchang3 committed Dec 26, 2024
1 parent 3a175a3 commit e1f3628
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/main.ts
Original file line number Diff line number Diff line change
Expand Up @@ -101,4 +101,7 @@ router.serve('https://www.bilibili.com/blackroom/ban/', () => hookBBComment({ bl
*/
router.serve('https://manga.bilibili.com/detail/', observeAndInjectComments)

router.match(location.href)
const { origin, pathname } = new URL(location.href)
const urlWithoutQueryOrHash = `${origin}${pathname}`

router.match(urlWithoutQueryOrHash)

0 comments on commit e1f3628

Please sign in to comment.