百度贴吧科学看图君

去除百度贴吧的连续看图模式,改为点击新标签打开无水印原图,同时支持帖子预览中“查看大图”按钮。

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

// ==UserScript==
// @name          百度贴吧科学看图君
// @version       2022.09.22
// @namespace     jiayiming
// @author        jiayiming
// @description   去除百度贴吧的连续看图模式,改为点击新标签打开无水印原图,同时支持帖子预览中“查看大图”按钮。
// @include       *://tieba.baidu.com/p/*
// @include       *://tieba.baidu.com/f?*
// @include       *://tieba.baidu.com/i/*
// @homepageURL   https://gf.qytechs.cn/scripts/784/
// @grant         none
// ==/UserScript==

(function () {

    // 列表 j_ypic    i贴吧 j_full
    $(document).on('mousedown', '.j_ypic, .j_full', function () {
        const id = new URL(this.href);
        let url;
        if (id.searchParams.has('pic_id')) {
            url = new URL($('.media_bigpic_wrap>img')[$('.j_ypic, .j_full').index(this)].src);
            this.href = url.toString().replace(/^https?:\/\/.*?w%3D580\/sign=[^/]+\//,'https://tiebapic.baidu.com/forum/pic/item/');
        }
    });

    // 帖子
    $(document).on('mousedown', '.BDE_Image', function () {
        $(this).off('click');

        this.onclick = function(e){
            if (e.button == 0) {
                const url = new URL(this.src);
                window.open(url.toString().replace(/^https?:\/\/.*?w%3D580\/sign=[^/]+\//,'https://tiebapic.baidu.com/forum/pic/item/'));
            }
        }
    });

})();

QingJ © 2025

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