说一句下面的提示统一成留言规则(app.js 先画了「今天还能说 N 句」)

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
deploy
2026-11-07 02:47:49 +00:00
parent d5b62f88a4
commit d8435e3dc8
2 changed files with 9 additions and 1 deletions

View File

@@ -271,11 +271,19 @@
else snap('half');
});
/* app.js 先画了「今天还能说 N 句」(那时本脚本还没加载)—— 说一句现在发进留言区,不再按每天 3 句算,换成留言规则 */
function fixLeft() {
var el = document.getElementById('whpLeft');
if (el && /^今天/.test(el.textContent)) el.textContent = '先审核再公开,被赞 ' + STAR_N + ' 次就变成星星';
}
new MutationObserver(fixLeft).observe(document.getElementById('whpLeft'), { childList: true, characterData: true, subtree: true });
/* 关掉星空页时面板一起收 */
new MutationObserver(function () {
fixLeft();
if (page.classList.contains('show')) load(); else snap('closed');
}).observe(page, { attributes: true, attributeFilter: ['class'] });
if (page.classList.contains('show')) load();
fixLeft();
/* 星空页「说一句」→ 发成留言(app.js 的 #whSend 调)。返回 Promise:resolve(null) = 成功,resolve('提示') = 没发出去 */
window.MBWhCm = {