mirror of
https://github.com/the1812/Bilibili-Evolved.git
synced 2025-11-04 21:22:45 +08:00
Fix async condition not work in Violentmonkey with Firefox
This commit is contained in:
parent
003cd10d8a
commit
ee052033e5
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
@ -1982,7 +1982,7 @@ class ResourceManager
|
||||
if (typeof info.condition === "function")
|
||||
{
|
||||
condition = info.condition();
|
||||
if (condition instanceof Promise)
|
||||
if (typeof condition === "object" && "then" in condition)
|
||||
{
|
||||
condition = await condition.catch(() => { return false; });
|
||||
}
|
||||
|
||||
@ -1982,7 +1982,7 @@ class ResourceManager
|
||||
if (typeof info.condition === "function")
|
||||
{
|
||||
condition = info.condition();
|
||||
if (condition instanceof Promise)
|
||||
if (typeof condition === "object" && "then" in condition)
|
||||
{
|
||||
condition = await condition.catch(() => { return false; });
|
||||
}
|
||||
|
||||
@ -206,7 +206,7 @@ export class ResourceManager
|
||||
if (typeof info.condition === "function")
|
||||
{
|
||||
condition = info.condition();
|
||||
if (condition instanceof Promise)
|
||||
if (typeof condition === "object" && "then" in condition)
|
||||
{
|
||||
condition = await condition.catch(() => { return false; });
|
||||
}
|
||||
|
||||
File diff suppressed because one or more lines are too long
|
Before Width: | Height: | Size: 45 KiB After Width: | Height: | Size: 45 KiB |
@ -321,4 +321,7 @@
|
||||
</div>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
<div class="custom-navbar-settings">
|
||||
|
||||
</div>
|
||||
|
Before Width: | Height: | Size: 48 KiB After Width: | Height: | Size: 48 KiB |
Loading…
Reference in New Issue
Block a user