留言区排序:挂了星的排最前(模拟留言 star 为空时比较出 NaN)
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
@@ -67,7 +67,7 @@
|
||||
/* 最热:赞多的在前(挂了星的真实留言再往前提);最新:真实留言按时间,模拟的接在后面;同孕周:和我差 ±1 周的,按最热 */
|
||||
function sorted() {
|
||||
var mine = REAL.filter(function (c) { return c.me; }), rest = REAL.filter(function (c) { return !c.me; }).concat(SIM);
|
||||
var hot = function (a, b) { return (b.star - a.star) || (likesOf(b) - likesOf(a)); };
|
||||
var hot = function (a, b) { return (!!b.star - !!a.star) || (likesOf(b) - likesOf(a)); };
|
||||
if (SORT === 'new') rest = rest.filter(function (c) { return c.real; }).sort(function (a, b) { return b.ts - a.ts; }).concat(SIM);
|
||||
else if (SORT === 'wk') {
|
||||
var w = +window.MB_WH_WEEK || 0;
|
||||
|
||||
Reference in New Issue
Block a user