From ad9352ca5ab97894a1ba4b3be5345bf7bf76ba4c Mon Sep 17 00:00:00 2001 From: FoundTheWOUT Date: Sun, 28 Mar 2021 19:10:29 +0800 Subject: [PATCH 1/2] =?UTF-8?q?=E6=94=B9=E8=BF=9BgetBlackboards?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/style/simplify-home/simple-home/blackboard.ts | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/style/simplify-home/simple-home/blackboard.ts b/src/style/simplify-home/simple-home/blackboard.ts index bd8438060..8671a2dc2 100644 --- a/src/style/simplify-home/simple-home/blackboard.ts +++ b/src/style/simplify-home/simple-home/blackboard.ts @@ -7,8 +7,9 @@ export interface Blackboard { export const getBlackboards = async (): Promise => { if (dq('.international-home')) { const initData = await SpinQuery.condition(() => unsafeWindow['__INITIAL_STATE__'], it => it !== undefined) + let half = dqa('.home-slide .item').length / 2 return dqa('.home-slide .item') - .slice(0, 5) + .slice(0, half) .map((it, index) => { const locID = it.querySelector('a')!.getAttribute('data-loc-id')! return { From d73e876c636a37f8aff5f4961fff60fe5870efcb Mon Sep 17 00:00:00 2001 From: FoundTheWOUT Date: Sun, 28 Mar 2021 21:23:26 +0800 Subject: [PATCH 2/2] edit blackboard --- src/style/simplify-home/simple-home/blackboard.ts | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/src/style/simplify-home/simple-home/blackboard.ts b/src/style/simplify-home/simple-home/blackboard.ts index 8671a2dc2..dd7d49286 100644 --- a/src/style/simplify-home/simple-home/blackboard.ts +++ b/src/style/simplify-home/simple-home/blackboard.ts @@ -7,9 +7,8 @@ export interface Blackboard { export const getBlackboards = async (): Promise => { if (dq('.international-home')) { const initData = await SpinQuery.condition(() => unsafeWindow['__INITIAL_STATE__'], it => it !== undefined) - let half = dqa('.home-slide .item').length / 2 - return dqa('.home-slide .item') - .slice(0, half) + return dqa('.first-screen .home-slide .item') + .slice(0, 5) .map((it, index) => { const locID = it.querySelector('a')!.getAttribute('data-loc-id')! return {