预览站不跟 UGC 开关、一直显示广场/测一测(?ugc=0 看关闭效果),正式站照开关(v26110417)
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
@@ -23,6 +23,13 @@
|
||||
apply(on);
|
||||
if (guard && !on) de.style.visibility = 'hidden'; /* 还不知道开没开:先别露内容,免得关着时闪一下 */
|
||||
|
||||
/* 11-04 用户:「回到改预览页面」→ 预览站(/mama-box-preview/)不跟后台开关,一直显示,方便看广场改动;?ugc=0 看关闭效果。正式站照开关走。 */
|
||||
if (/\/mama-box-preview\//.test(location.pathname)) {
|
||||
var pv = !/[?&]ugc=0/.test(location.search);
|
||||
apply(pv); if (guard) { if (!pv) goHome(); else de.style.visibility = ''; }
|
||||
window.__mbUgcReady = Promise.resolve(pv);
|
||||
return;
|
||||
}
|
||||
window.__mbUgcReady = new Promise(function (res) {
|
||||
var t = setTimeout(function () { res(null); }, 4000);
|
||||
fetch('/api/mp/public/mama-box/config', { cache: 'no-store' })
|
||||
|
||||
Reference in New Issue
Block a user