From ab616255abc4cafe91ab7e3a0cb2e90ad74f1c35 Mon Sep 17 00:00:00 2001 From: xing Date: Sat, 28 Mar 2020 01:15:47 +0800 Subject: [PATCH] =?UTF-8?q?=E6=94=B6=E8=97=8F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- tieba page.js | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/tieba page.js b/tieba page.js index d930382..0bba6a1 100644 --- a/tieba page.js +++ b/tieba page.js @@ -450,6 +450,7 @@ } + let book, sl; function clickControl() { let el = ['list_item_top_name', 'j_new_header_reply', 'list_item_user_wrap', 'user_img', 'user_name', 'icon_tieba_edit', 'reply_num', 'for_app_label_text_tag']; @@ -549,7 +550,7 @@ let a = /function\(SignArrow\)\{(.*?)\}\)\;\}\)/.exec($('html').html())[1].replace('new SignArrow', ''); let _sl = (new Function(a + ';return _sl'))(); F.use(['sfrs/widget/sign_arrow'], SignArrow => { - let sl = new SignArrow(_sl); + const sl = new SignArrow(_sl); sl.likeHandle(); }); } @@ -560,9 +561,11 @@ let a = /function\(MoreNewSpinner\)\{((.*?)moreNewSpinner\.init\(\);)/.exec($('html').html())[2].replace('new MoreNewSpinner', ''); let c = (new Function(a + ';return moreNewSpinner'))(); F.use(['spb/widget/more_newspinner'], MoreNewSpinner => { - let moreNewSpinner = new MoreNewSpinner(c); - moreNewSpinner.init(); - moreNewSpinner.handleCollect(ev); + if (!book) { + book = new MoreNewSpinner(c); + book.init(); + } + book.handleCollect(ev); }); } @@ -573,7 +576,7 @@ let a = /function\(SignArrow\)\{(.*?)\}\)\;\}\)/.exec($('html').html())[1].replace('new SignArrow', ''); let _sl = (new Function(a + ';return _sl'))(); F.use(['sfrs/widget/sign_arrow'], SignArrow => { - let sl = new SignArrow(_sl); + const sl = new SignArrow(_sl); sl.signHandle(); }); }