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();