Skip to content

Commit

Permalink
fix: cloudflare detection & clickOutside error
Browse files Browse the repository at this point in the history
  • Loading branch information
Dastan21 committed Feb 6, 2023
1 parent baef890 commit d2ce64f
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions src/common/utils.js
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ export function getCurrentSection (title = window.title) {
let section = bvaRoot.getAttribute('bva-section')
if (section != null && title == null) return section
title = title.toLowerCase()
if (title.startsWith('just a moment')) section = 'cloudflare'
if (document.body.classList.contains('no-js')) section = 'cloudflare'
else if (title.startsWith('liste d\'animes')) section = 'anime-list'
else if (title.startsWith('you searched for')) section = 'search'
else if (title.endsWith('archives - voiranime') || title.includes('archives - page ')) section = 'genre-list'
Expand Down Expand Up @@ -278,7 +278,7 @@ export function onClickOutside ($el, callback) {
if ($el.__clickoutside) return

const clickFunction = (e) => {
if (!e.path.some(($e) => {
if (!e.composedPath()?.some(($e) => {
if ($e.tagName == null) return false
return $el.isEqualNode($e)
})) return
Expand Down
2 changes: 1 addition & 1 deletion src/manifest.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "Better VoirAnime",
"version": "0.0.4",
"version": "0.0.5",
"manifest_version": 3,
"description": "A powerful UI/UX changer for 'voiranime.com'",
"icons": {
Expand Down

0 comments on commit d2ce64f

Please sign in to comment.