Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions _data/settings.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -37,3 +37,9 @@ miscellaneous_hits:
options:
- enable
- disable
crash_support_group_rule:
type: radio
default: disagree
options:
- disagree
- agree
122 changes: 54 additions & 68 deletions _docs/crash-support-group.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,93 +3,79 @@ title: 加入 HMCL 报错崩溃交流群
excerpt: HMCL 报错崩溃交流群仅处理游戏报错与崩溃问题
date: 2024-03-05 17:00:00 +0800
author: zkitefly
classes: wide
toc: false
---

<!----{{'>'}}
<div id="alert-modal">
<div class="notice">
{% capture notice %}
<!---->
<h1 id="" align="center">加入群聊前请注意</h1>

- 游戏非正常退出时,请点击左下角 ![](/assets/img/docs/groups/button-1.png "导出游戏崩溃日志") 按钮(不是 ![](/assets/img/docs/groups/button-2.png "日志") 按钮),并完整发送生成的报错压缩包
- 遇到其他问题时,请详细说明情况并提供相关截图,以便我们提供帮助
- 使用整合包时,请说明具体的整合包名称与版本
- 请保持耐心,群管理和群友会协助解决问题。严禁辱骂、催促他人
- 禁止讨论政治、色情、违法、金钱交易等敏感内容,禁止人身攻击、造谣诽谤等行为
- 禁止刷屏、灌水、挑起争端、发泄情绪等影响群聊秩序的行为
- 禁止使用第三方插件发送特殊消息;禁止讨论多人游戏作弊工具
- 本群仅支持 HMCL 启动器相关问题。PCL 启动器用户请加入 978054335 群
- 请勿重复发送文件,如需重新获取关注,请引用之前发送的消息
- 因人数限制,已解决问题的用户会被移出群聊。如遇新问题可再次加入
- 本群仅处理游戏崩溃相关问题,其他话题请到其他群讨论

---
<!----{{'>'}}
{% endcapture %}
{{ notice | markdownify }}
<p class="text-center">请等待 <span id="countdown">5</span> 秒,请认真阅读注意事项</p>
<button id="close-btn" class="btn align-center" disabled>我已了解</button>
</div>
<div id="alert-modal" class="notice mfp-hide">
<h1 id="" class="text-center">加入群聊前请注意</h1>
<ul class="task-list">
<li>
<details open>
<summary>游戏非正常退出时请点击左下角导出游戏崩溃日志按钮(注意不是日志按钮),并完整发送生成的报错压缩包</summary>
<div class="notice--success"><img src="/assets/img/docs/groups/button-1.png" title="导出游戏崩溃日志" loading="lazy"> <img src="/assets/img/docs/groups/button-2.png" title="日志" loading="lazy"></div>
</details>
</li>
<li>遇到其他问题时,请详细说明情况并提供相关截图,以便我们提供帮助</li>
<li>使用整合包时,请说明具体的整合包名称与版本</li>
<li>请保持耐心,群管理和群友会协助解决问题。严禁辱骂、催促他人</li>
<li>禁止讨论政治、色情、违法、金钱交易等敏感内容,禁止人身攻击、造谣诽谤等行为</li>
<li>禁止刷屏、灌水、挑起争端、发泄情绪等影响群聊秩序的行为</li>
<li>禁止使用第三方插件发送特殊消息;禁止讨论多人游戏作弊工具</li>
<li>本群仅支持 HMCL 启动器相关问题。PCL 启动器用户请加入 978054335 群</li>
<li>请勿重复发送文件,如需重新获取关注,请引用之前发送的消息</li>
<li>因人数限制,已解决问题的用户会被移出群聊。如遇新问题可再次加入</li>
<li>本群仅处理游戏崩溃相关问题,其他话题请到其他群讨论</li>
</ul>
<hr>
<!----{{'>'}}
<div>
<a class="btn btn--inverse" href="{{ page.previous.url | relative_url }}">上一页</a>
<a class="btn btn--inverse" href="{{ page.next.url | relative_url }}">下一页</a>
<button id="close-btn" class="btn align-right" disabled>我已了解</button>
</div>
{{'<'}}!---->
</div>
<!---->

如果你遇到了游戏非正常退出问题,欢迎加入报错崩溃交流群咨询解决方案:[Minecraft 报错崩溃交流群 (666546887)](https://qm.qq.com/q/nG0Ti1kJri)

![](/assets/img/docs/groups/crash.png)
<img src="/assets/img/docs/groups/crash.png" alt="Minecraft 报错崩溃交流群 (666546887) 二维码" loading="lazy">

**本群仅处理游戏报错崩溃问题,无关话题请前往其他群聊讨论。**

由于加群人数过多,我们会移出问题已解决的用户。如果你在被移出后遇到了新的问题需要求助,你可以再次加群。

<!----{{'>'}}
<style>
.initial-content {
position: relative;
z-index: 20;
}

#alert-modal {
position: fixed;
top: 0;
left: 0;
width: 100%;
height: 100%;
padding: 1em;
display: flex;
background: #00000090;
justify-content: center;
align-items: center;
z-index: 20;
}
#alert-modal img {
display: inline;
height: 1.5em;
vertical-align: middle;
}
.mfp-content { max-width: 798px; }
.page__content { filter: blur(8px); }
.page__content.hide-filter { filter: none; }
</style>
<script>
document.addEventListener("DOMContentLoaded", function () {
var modal = document.getElementById("alert-modal");
var show = localStorage.getItem("crash-support-group.show");
if (show === "1") {
modal.style.display = "none";
return;
window.addEventListener("load", () => {
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge Open the gate before waiting for images

Because the rules dialog is only opened from the window load event, it waits for every image on the page (including the QR code below the link) to finish loading before showing the modal. On slow or stalled image loads, first-time visitors can see and click the QQ invite link for an extended period without ever seeing the required notice, which defeats the purpose of gating access; use DOMContentLoaded/ready instead so the modal appears as soon as the DOM is available.

Useful? React with 👍 / 👎.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

因为弹窗依赖 jquery 插件,所以需要等待 main.min.js 加载完毕后才能执行弹窗动作。
为缓解此问题我已为页面内容添加模糊效果并将文章中的图片调整为懒加载模式。

const status = settings.get("crash_support_group_rule");
const $modal = $("#alert-modal");
if (status === "agree") {
return $modal.parent().addClass("hide-filter");
}
var text = document.getElementById("countdown");
var btn = document.getElementById("close-btn");
var sec = parseInt(text.textContent, 10) || 10;
var timer = setInterval(function () {
text.textContent = --sec;
$.magnificPopup.open({
items: { src: '#alert-modal', type: 'inline' },
modal: true
});
let sec = 10;
const $btn = $("#close-btn");
const timer = setInterval(function() {
$btn.text("请等待 " + --sec + " 秒");
if (sec <= 0) {
clearInterval(timer);
text.parentNode.textContent = "请点击下方按钮关闭";
btn.disabled = false;
$btn.text("我已了解");
$btn.prop("disabled", false);
}
}, 1000);
btn.addEventListener("click", function () {
localStorage.setItem("crash-support-group.show", "1");
modal.style.display = "none";
}, false);
$btn.on("click", () => {
settings.set("crash_support_group_rule", "agree");
$.magnificPopup.close();
$modal.parent().addClass("hide-filter");
});
});
</script>