diff --git a/tieba page.js b/tieba page.js index babca4c..ed3a22d 100644 --- a/tieba page.js +++ b/tieba page.js @@ -342,6 +342,16 @@ function llxx(li) { + [...li.querySelectorAll('.floor_footer_item')].forEach(el => { + el.onclick = (e) => { + e.stopPropagation(); + } + }); + [...li.querySelectorAll('a.user_name')].forEach(a => { + if (a.href.indexOf(' ') > -1) { + a.href = a.href.replaceAll(' ', ''); + } + }); let info = JSON.parse(li.dataset.info); if (!window.lz) { lzl(); @@ -366,7 +376,7 @@ if (window.lz.un === info.un || window.lz.name_show === info.un) { x = i } - rep.outerHTML = `${xx}` + x + y; + rep.outerHTML = `${xx}` + x + y; let c = li.querySelector('.floor_content a[href*="/home/main?un="]') if (!c) { c = li.querySelector('.floor_content a[href*="jump?un="]'); @@ -464,7 +474,7 @@ let url = this.getAttribute('data-url'); if (num <= 8) { $.get(url, function (rst) { - replayPage({data: {floor_html: rst}}, el, ls => { + replayPage({ data: { floor_html: rst } }, el, ls => { ls.splice(0, 2) that.parentNode.removeChild(that); }); @@ -488,14 +498,14 @@ let url = `/p/comment?tid=${kz}&pid=${tid}&pn=${page}&t=${tt}`; gmPage(url, el, page, function () { let l = lo(document, el); - window.scrollTo({top: l.top - 20, left: 0, behavior: "smooth"}); + window.scrollTo({ top: l.top - 20, left: 0, behavior: "smooth" }); }); }); } }) } else { $.get(url, function (rst) { - replayPage({data: {floor_html: rst}}, el, ls => { + replayPage({ data: { floor_html: rst } }, el, ls => { ls.splice(0, 2) }); if (num <= 8) { @@ -513,7 +523,7 @@ $.get(url, res => { replayPage(res, el); let l = lo(document, el); - window.scrollTo({top: l.top - 20, left: 0, behavior: "smooth"}); + window.scrollTo({ top: l.top - 20, left: 0, behavior: "smooth" }); }) }); } @@ -912,6 +922,11 @@ u.searchParams.set('pn', '0'); title.href = u.toString() } + [...document.querySelectorAll('.flist a.user_name')].forEach(a => { + if (a.href.indexOf(' ') > -1) { + a.href = a.href.replaceAll(' ', ''); + } + }); god(); p(); reply(); @@ -930,7 +945,7 @@ let lxf = document.querySelector('.father-cut-pager-class-no-page') - if(lxf){ + if (lxf) { lxf.classList.remove('father-cut-pager-class-no-page'); } @@ -968,7 +983,7 @@ 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']; + let el = ['list_item_top_name', 'floor_footer_item', 'j_new_header_reply', 'list_item_user_wrap', 'user_img', 'user_name', 'icon_tieba_edit', 'reply_num', 'for_app_label_text_tag']; document.querySelector('body').addEventListener('click', ev => { for (let i in el) { if (ev.target.classList.contains(el[i])) { @@ -1215,11 +1230,11 @@ location.href = '/mo/q/searchpage'; break; case 1: - window.scrollTo({top: 0, left: 0, behavior: "smooth"}); + window.scrollTo({ top: 0, left: 0, behavior: "smooth" }); dd(); break; case 2: - window.scrollTo({top: document.documentElement.scrollHeight, left: 0, behavior: "smooth"}); + window.scrollTo({ top: document.documentElement.scrollHeight, left: 0, behavior: "smooth" }); dd(); break; case 3: