# 有办法通过检查工具阻止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:** 14
**Page:** 1

<div class="post-metadata">

### Author: ![bob\_the\_tomato](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/bob_the_tomato/32/454388_2.png) [@bob\_the\_tomato](https://meta.discourse.org/u/bob_the_tomato)
#### Post date: [2024年十二月8日 19:01 UTC](https://meta.discourse.org/t/is-there-any-way-to-prevent-the-failed-message-via-inspect-tool/341243/1 "2024-12-08T19:01:07Z")

</div>

_[从该主题继续](https://meta.discourse.org/t/changing-favorite-badges-leads-to-failed-message/336839/3)_

* * *

有没有办法通过检查来阻止“失败”消息？我不是管理员，也无法使用 mod 小工具。  
如果您能提供帮助，我将不胜感激！

---

<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());
> 
> ```

---

<div class="post-metadata">

### Author: ![bob\_the\_tomato](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/bob_the_tomato/32/454388_2.png) [@bob\_the\_tomato](https://meta.discourse.org/u/bob_the_tomato)
#### Post date: [2024年十二月9日 00:40 UTC](https://meta.discourse.org/t/is-there-any-way-to-prevent-the-failed-message-via-inspect-tool/341243/3 "2024-12-09T00:40:40Z")

</div>

我不能成为管理员。  
等等，我的意思是，我联系不上管理员，我不知道我怎么会得到那个，哈哈。

---

<div class="post-metadata">

### Author: ![Moin](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/moin/32/554653_2.png) [@Moin](https://meta.discourse.org/u/Moin)
#### Post date: [2024年十二月9日 00:42 UTC](https://meta.discourse.org/t/is-there-any-way-to-prevent-the-failed-message-via-inspect-tool/341243/4 "2024-12-09T00:42:06Z")

</div>

但是您是“普通用户”，不是吗？

---

<div class="post-metadata">

### Author: ![bob\_the\_tomato](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/bob_the_tomato/32/454388_2.png) [@bob\_the\_tomato](https://meta.discourse.org/u/bob_the_tomato)
#### Post date: [2024年十二月9日 00:42 UTC](https://meta.discourse.org/t/is-there-any-way-to-prevent-the-failed-message-via-inspect-tool/341243/5 "2024-12-09T00:42:40Z")

</div>

是的，但我无法联系管理员，也无法使用 GitHub。

---

<div class="post-metadata">

### Author: ![Moin](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/moin/32/554653_2.png) [@Moin](https://meta.discourse.org/u/Moin)
#### Post date: [2024年十二月9日 00:45 UTC](https://meta.discourse.org/t/is-there-any-way-to-prevent-the-failed-message-via-inspect-tool/341243/6 "2024-12-09T00:45:37Z")

</div>

这如何阻止您使用上面引用的普通用户变通方法？

我猜您使用浏览器，因此您可以搜索如何使用其 JavaScript 控制台并使用普通用户的变通方法。

---

<div class="post-metadata">

### Author: ![bob\_the\_tomato](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/bob_the_tomato/32/454388_2.png) [@bob\_the\_tomato](https://meta.discourse.org/u/bob_the_tomato)
#### Post date: [2024年十二月9日 00:50 UTC](https://meta.discourse.org/t/is-there-any-way-to-prevent-the-failed-message-via-inspect-tool/341243/7 "2024-12-09T00:50:52Z")

</div>

有人告诉我，github 只能在功能齐全的电脑上运行，而我只有一台笔记本电脑。

---

<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年十二月9日 02:35 UTC](https://meta.discourse.org/t/is-there-any-way-to-prevent-the-failed-message-via-inspect-tool/341243/8 "2024-12-09T02:35:27Z")

</div>

@bob_the_tomato 我引用的代码可以通过检查页面并在 Javascript 控制台中运行来执行。它是为普通用户设计的。据我所知，该代码没有 Github 元素。

---

<div class="post-metadata">

### Author: ![Jagster](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/jagster/32/192154_2.png) [@Jagster](https://meta.discourse.org/u/Jagster)
#### Post date: [2024年十二月9日 08:05 UTC](https://meta.discourse.org/t/is-there-any-way-to-prevent-the-failed-message-via-inspect-tool/341243/9 "2024-12-09T08:05:41Z")

</div>

> [@bob\_the\_tomato](#):
>
> github 仅在功能齐全的电脑上运行

笔记本电脑是一台功能齐全的电脑（即使是 Mac，但其他方面苹果在其所有设备上都有自己的政策）。

但你为什么不能联系管理员？他们藏起来了吗？那就用版主作为中介。

---

<div class="post-metadata">

### Author: ![bob\_the\_tomato](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/bob_the_tomato/32/454388_2.png) [@bob\_the\_tomato](https://meta.discourse.org/u/bob_the_tomato)
#### Post date: [2024年十二月26日 21:18 UTC](https://meta.discourse.org/t/is-there-any-way-to-prevent-the-failed-message-via-inspect-tool/341243/10 "2024-12-26T21:18:56Z")

</div>

你好！

谢谢你的帮助！  
但我太笨了，看不懂怎么下载代码。

 ![image](https://global.discourse-cdn.com/meta/original/4X/a/2/0/a206d70a5e521b29c230482b6fc0386b3615d549.png)  
我试着把它下载到浏览器，但不知道现在该怎么办。当我打开它时，它会带我到文本编辑器。

---

<div class="post-metadata">

### Author: ![Moin](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/moin/32/554653_2.png) [@Moin](https://meta.discourse.org/u/Moin)
#### Post date: [2024年十二月26日 22:00 UTC](https://meta.discourse.org/t/is-there-any-way-to-prevent-the-failed-message-via-inspect-tool/341243/11 "2024-12-26T22:00:06Z")

</div>

我还是不明白你想做什么。你为什么需要 GitHub，又为什么要下载 Ruby 文件？

1. 复制你在另一个主题中共享的代码：  

2. 使用例如 F12（或打开控制台的其他方法。搜索引擎可以帮助你找到如何在你的浏览器中执行此操作的指南）打开浏览器控制台。  

3. 将你复制的代码粘贴到控制台中：  

4. 按 Enter 键执行代码。

---

<div class="post-metadata">

### Author: ![bob\_the\_tomato](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/bob_the_tomato/32/454388_2.png) [@bob\_the\_tomato](https://meta.discourse.org/u/bob_the_tomato)
#### Post date: [2025年一月3日 04:48 UTC](https://meta.discourse.org/t/is-there-any-way-to-prevent-the-failed-message-via-inspect-tool/341243/12 "2025-01-03T04:48:55Z")

</div>

非常感谢！当我进入检查时，我看到了控制台选项，并且我运行了代码！再次感谢 :D

---

<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: [2025年一月3日 07:05 UTC](https://meta.discourse.org/t/is-there-any-way-to-prevent-the-failed-message-via-inspect-tool/341243/13 "2025-01-03T07:05:59Z")

</div>

如果您使用的是移动设备，并且在您是管理员的其他论坛上出现此问题，您可以使用此 TC：

> [@Unstar all badges](https://meta.discourse.org/t/unstar-all-badges/344167):
>
> information_sourceSummary Unstars all favourited badgeseyeglassesPreview [Theme Creator](https://discourse.theme-creator.io/theme/NateDhaliwal/unstar-all-badges)hammer_and_wrenchRepository [GitHub - NateDhaliwal/Unstar-all-badges](https://github.com/NateDhaliwal/Unstar-all-badges)questionInstall Guide [How to install a theme or theme component](https://meta.discourse.org/t/how-do-i-install-a-theme-or-theme-component/63682)open_bookNew to Discourse Themes? [Beginner’s guide to using Discourse Themes](https://meta.discourse.org/t/beginners-guide-to-using-discourse-themes/91966) Install this theme component After reading [this topic](https://meta.discourse.org/t/failed-error-when-trying-to-un-star-the-bug-reporter-badge/330523), I realised that it may not be very easy for users to open the console, especially on mobile. To help that, …

---

<div class="post-metadata">

### Author: ![system](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/system/32/443519_2.png) [@system](https://meta.discourse.org/u/system)
#### Post date: [2025年二月2日 07:06 UTC](https://meta.discourse.org/t/is-there-any-way-to-prevent-the-failed-message-via-inspect-tool/341243/14 "2025-02-02T07:06:08Z")

</div>

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.
