完善主题标题返回该吧和主楼图片显示问题
This commit is contained in:
parent
5679b04222
commit
59dd292477
|
@ -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 = `<div class="pb_img_item" data-url="${h}"><img data-url="${tmp}" class="BDE_Image" src="${h}" alt=""></div>`;
|
||||
|
@ -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();
|
||||
|
|
Loading…
Reference in New Issue
Block a user