From 59dd292477d7e049c5f88fe25663864aad54a073 Mon Sep 17 00:00:00 2001 From: xing Date: Sun, 9 Jul 2023 13:17:04 +0800 Subject: [PATCH] =?UTF-8?q?=E5=AE=8C=E5=96=84=E4=B8=BB=E9=A2=98=E6=A0=87?= =?UTF-8?q?=E9=A2=98=E8=BF=94=E5=9B=9E=E8=AF=A5=E5=90=A7=E5=92=8C=E4=B8=BB?= =?UTF-8?q?=E6=A5=BC=E5=9B=BE=E7=89=87=E6=98=BE=E7=A4=BA=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- tieba page.js | 18 ++++++++++++++---- 1 file changed, 14 insertions(+), 4 deletions(-) diff --git a/tieba page.js b/tieba page.js index 974d2e5..b0083e8 100644 --- a/tieba page.js +++ b/tieba page.js @@ -1,7 +1,7 @@ // ==UserScript== // @name tieba page // @namespace http://tampermonkey.net/ -// @version 1.022 +// @version 1.023 // @author fthvgb1 // @match https://tieba.baidu.com/* // @match https://tiebac.baidu.com/* @@ -26,6 +26,9 @@ if (imgs.length > 0) { imgs.forEach(value => { let h = value.dataset.url.replace('tiebapic', 'imgsrc').replace('tiebapic', 'imgsrc'); + if (h.indexOf('http://') === 0) { + h = 'https://image.baidu.com/search/down?url=' + h; + } let tmp = decodeURIComponent(h.split('&src=')[1]).split('/'); tmp = tmp[tmp.length - 1]; value.outerHTML = `
`; @@ -898,9 +901,16 @@ } function detail() { - let title = document.querySelector('.post_title_text'); - if (title) { - // title.href=title.href.replace('f?kw=','mo/q/m?word=') + let title = document.querySelector('#i_head .post_title_text'); + if (title !== null) { + const ur = title.href.replace('f?kw=', 'mo/q/m?word=') + const u = new URL(ur); + u.searchParams.set('tn6', 'bdISP'); + u.searchParams.set('tn4', 'bdKSW'); + u.searchParams.set('tn7', 'bdPSB'); + u.searchParams.set('sub4', '进吧'); + u.searchParams.set('pn', '0'); + title.href = u.toString() } god(); p();