Greasy Fork is available in English.

百度贴吧科学看图君

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

ของเมื่อวันที่ 15-12-2019 ดู เวอร์ชันล่าสุด

// ==UserScript==
// @id                 tieba_simple_picview
// @name           百度贴吧科学看图君
// @version         2019.12.15
// @namespace   jiayiming
// @author          jiayiming
// @description   去除百度贴吧的连续看图模式,改为点击新标签打开无水印原图,同时支持帖子预览中“查看大图”按钮。
// @include         *://tieba.baidu.com/p/*
// @include         *://tieba.baidu.com/f?*
// @include         *://tieba.baidu.com/i/*
// @homepageURL  https://greasyfork.org/scripts/784/
// @require          http://code.jquery.com/jquery-3.3.1.slim.min.js
// @grant             unsafeWindow
// @run-at           document-end
// ==/UserScript==

(function () {

    // 列表 j_ypic    i贴吧 j_full
    $(document).on('mousedown', '.j_ypic, .j_full', function () {
        let url = new URL(this.href);
        if (url.searchParams.has('pic_id')) {
            this.href = `https://imgsrc.baidu.com/forum/pic/item/${url.searchParams.get("pic_id")}.jpg`;
            //GM_openInTab(`https://imgsrc.baidu.com/forum/pic/item/${url.searchParams.get("pic_id")}.jpg`);
        }
    });

    // 帖子
    $(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(`https://` + url.host + `/forum/pic/item/${url.pathname.split('/').pop()}`);
            }
        }
    });

})();