# 有办法通过检查工具阻止FAILED消息吗？

**URL:** <https://meta.discourse.org/t/is-there-any-way-to-prevent-the-failed-message-via-inspect-tool/341243>\
**Category:** Support\
**Created:** [2024年十二月8日 19:01 UTC](https://meta.discourse.org/t/is-there-any-way-to-prevent-the-failed-message-via-inspect-tool/341243 "2024-12-08T19:01:07Z")\
**Posts on this page:** 1\
**Showing post:** 2

<div class="post-metadata">

**Author:** ![NateDhaliwal](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/natedhaliwal/32/313494_2.png) [@NateDhaliwal](https://meta.discourse.org/u/NateDhaliwal)\
**Post date:** [2024年十二月8日 23:57 UTC](https://meta.discourse.org/t/is-there-any-way-to-prevent-the-failed-message-via-inspect-tool/341243/2 "2024-12-08T23:57:45Z")

</div>

你看到链接的帖子了吗？

> [@pangbo](#):
>
> 作为临时解决方案，普通用户可以通过在控制台中运行以下 JavaScript 代码来取消收藏所有徽章：
> 
> ```js
> const user_name = require("discourse/models/user").default.current().username;
> const badges = await require("discourse/models/user-badge").default.findByUsername(user_name);
> const favorites = new Map();
> badges.filter((b)=>b.is_favorite).forEach((b)=>favorites.set(b.badge_id,b));
> favorites.forEach((b)=>b.favorite());
> 
> ```

---

_[View the full topic](https://meta.discourse.org/t/is-there-any-way-to-prevent-the-failed-message-via-inspect-tool/341243)._
