百度贴吧添加我的回复按钮

消息按钮列表显示我的回复

当前为 2022-10-10 提交的版本,查看 最新版本

// ==UserScript==
// @name         百度贴吧添加我的回复按钮
// @namespace    http://tampermonkey.net/
// @version      0.1.7
// @description  消息按钮列表显示我的回复
// @author       AN drew
// @match        https://tieba.baidu.com/*
// @license      MIT
// @grant        GM_addStyle
// ==/UserScript==

(function() {
    'use strict';

    setTimeout(function(){
        $('#com_userbar > ul > li.u_news > div.u_ddl > div > div.u_ddl_con_top > div > ul.sys_notify.j_sys_notify.j_category_list > li:nth-child(2)').after('<li class="category_item category_item_empty">        <a class="j_cleardata" href="http://tieba.baidu.com/i/i/my_reply" target="_blank" data-type="reply" se_prerender_url="complete">我的回复            </a>        </li>');
        $('#u_notify_item > li:nth-child(2)').after('<li class="category_item category_item_empty">        <a class="j_cleardata" href="http://tieba.baidu.com/i/i/my_reply" target="_blank" data-type="reply" se_prerender_url="complete">我的回复            </a>        </li>');
    },5000);

    if(window.location.href.indexOf('tieba.baidu.com/p/') > -1)
    {
        let timer = setInterval(function(){
            let fa_date
            $('.p_postlist .l_post:first-child .tail-info').each(function(){
                if($(this).text().indexOf('-')>-1 && $(this).text().indexOf(':')>-1)
                {
                    fa_date=new Date($(this).text());
                }
            })

            let now_date=new Date();
            if(now_date-fa_date>7*24*60*60*1000)
            {
                $('#j_core_title_wrap, .core_title_theme_bright,.l_post_bright, .l_post_bright .d_post_content_main, .l_post_bright .d_post_content_main .p_content').css('background','red');
                clearInterval(timer);
            }
        },1000);
    }
    $('.b_right_up nobr:nth-child(2) .b_reply').each(function(){
        if(!$(this).hasClass('pic') && $(this).text()=='回复')
        {
            $(this).text('【图片回复】');
            $(this).addClass('pic');
        }
    })

    GM_addStyle(`body {overflow-x: auto;}
    .af_container{overflow: auto;}
    .tbui_aside_float_bar{display:none!important}
    .j_thread_list.hide{display:none!important}`);

})();

QingJ © 2025

镜像随时可能失效,请加Q群300939539或关注我们的公众号极客氢云获取最新地址