This commit is contained in:
xing 2025-03-29 20:19:20 +08:00
parent de16f18b11
commit c163d9b5de

View File

@ -1,7 +1,7 @@
// ==UserScript==
// @name tieba page
// @namespace http://tampermonkey.net/
// @version 1.026
// @version 1.027
// @author fthvgb1
// @match https://tieba.baidu.com/*
// @match https://tiebac.baidu.com/*
@ -1247,61 +1247,50 @@
document.querySelector('body').appendChild(d);
}
if (document.readyState === "loading") {
document.addEventListener("DOMContentLoaded", () => {
startFn();
});
} else {
startFn();
}
const startFn = () => {
try {
if (!check()) {
return;
}
let x = location.href.match(/\/p\/(\d+)(\?|\#)?/);
if (x) {
location.href = `/mo/q/m?kz=${x[1]}`;
return;
}
fnav();
clickControl();
let css = document.createElement('style');
css.textContent = `
.class_hide_flag{display:block!important;}.father-cut-pager-class-no-page>#list_pager{visibility: visible!important;height: 44px!important;}#glob,body{margin-top: 0px!important;}.father_cut_list_class{padding-bottom: 0px!important;}.father-cut-recommend-normal-box,.father-cut-daoliu-normal-box,.fixed_bar,.pb,.frs,.no_mean,.addbodybottom,.img_desc,.top-guide-wrap,.open-style,.index-feed-cards .hot-topic,.appPromote_wrapper,.ui_image_header_bottom,.videoFooter,#diversBanner,.tb-footer-wrap,.interest-bar,.footer-wrap,.client-btn,.daoliu{display:none!important;}.tl_shadow:not([data-tid]),#pblist>li:not([data-tid]){display:none!important;}.navbar-view{top:24px!important;}.navbar-box{top:44px!important;}
.footer_logo,.footer-version { display:none!important}
.fr_list .list_item_floor { padding-top: 8px;
letter-spacing: 1px;
border-radius: 8px;
margin-bottom: 2px
border: 1px solid rgba(0,0,0,.1);
box-shadow: 5px 5px 5px rgba(0,0,0,0.2);}
.floor_footer_item .user_name,.floor_footer_item .user_name:visited { color:#125bc7; }
.floor_content a,.floor_content a:visited { color:#498bef; }
.fr_list .list_item_floor:nth-child(odd){ background-color:rgba(180, 228, 207, 0.2); }
.fr_list .list_item_floor:nth-child(even){ background-color:rgba(168, 191, 157, 0.16); }
.nav-bar-wrapper { display:none; }
.tb-threadlist__item.tb-banner { display:none; }
.tb-threadlist__item.tb-hotthread-wrapper{ display:none; }
`;
document.querySelector('head').append(css);
//debugger
delElement(['.ui_image_header_bottom']);
if (document.querySelector('#pblist')) {
detail();
}
if (document.querySelector('#tlist')) {
list();
}
} catch (e) {
console.log(e)
try {
if (!check()) {
return;
}
let x = location.href.match(/\/p\/(\d+)(\?|\#)?/);
if (x) {
location.href = `/mo/q/m?kz=${x[1]}`;
return;
}
fnav();
clickControl();
let css = document.createElement('style');
css.textContent = `
.class_hide_flag{display:block!important;}.father-cut-pager-class-no-page>#list_pager{visibility: visible!important;height: 44px!important;}#glob,body{margin-top: 0px!important;}.father_cut_list_class{padding-bottom: 0px!important;}.father-cut-recommend-normal-box,.father-cut-daoliu-normal-box,.fixed_bar,.pb,.frs,.no_mean,.addbodybottom,.img_desc,.top-guide-wrap,.open-style,.index-feed-cards .hot-topic,.appPromote_wrapper,.ui_image_header_bottom,.videoFooter,#diversBanner,.tb-footer-wrap,.interest-bar,.footer-wrap,.client-btn,.daoliu{display:none!important;}.tl_shadow:not([data-tid]),#pblist>li:not([data-tid]){display:none!important;}.navbar-view{top:24px!important;}.navbar-box{top:44px!important;}
.footer_logo,.footer-version { display:none!important}
.fr_list .list_item_floor { padding-top: 8px;
letter-spacing: 1px;
border-radius: 8px;
margin-bottom: 2px
border: 1px solid rgba(0,0,0,.1);
box-shadow: 5px 5px 5px rgba(0,0,0,0.2);}
.floor_footer_item .user_name,.floor_footer_item .user_name:visited { color:#125bc7; }
.floor_content a,.floor_content a:visited { color:#498bef; }
.fr_list .list_item_floor:nth-child(odd){ background-color:rgba(180, 228, 207, 0.2); }
.fr_list .list_item_floor:nth-child(even){ background-color:rgba(168, 191, 157, 0.16); }
.nav-bar-wrapper { display:none; }
.tb-threadlist__item.tb-banner { display:none; }
.tb-threadlist__item.tb-hotthread-wrapper{ display:none; }
`;
document.querySelector('head').append(css);
//debugger
delElement(['.ui_image_header_bottom']);
if (document.querySelector('#pblist')) {
detail();
}
if (document.querySelector('#tlist')) {
list();
}
} catch (e) {
console.log(e)
}
})();