last-sub:不按 .ugc-off 判断(开关没回来前默认关会误删)
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
@@ -12,8 +12,7 @@
|
||||
var DROP = /^(openid|unionid|t|_v|phone|nickname|avatar|__no_identity)$/;
|
||||
function save() {
|
||||
try {
|
||||
/* 广场 / 测一测关着(ugc.js data-guard 会把页面送回首页):不记,免得首页又送回来 */
|
||||
if (document.documentElement.classList.contains('ugc-off') && document.querySelector('script[data-guard]')) { localStorage.removeItem(K); return; }
|
||||
/* 广场 / 测一测关着时 ugc.js 送回首页前会清掉这条记录(不在这里按 .ugc-off 判断:开关接口没回来前它默认是关,会误删) */
|
||||
var q = new URLSearchParams(location.search), k = [];
|
||||
q.forEach(function (v, n) { if (DROP.test(n)) k.push(n); });
|
||||
k.forEach(function (n) { q.delete(n); });
|
||||
|
||||
Reference in New Issue
Block a user