BBS NoWater

吃掉纯图和纯表情回复,支持百度贴吧和phpwind/discuz的某些版本

您需要先安装一个扩展,例如 篡改猴Greasemonkey暴力猴,之后才能安装此脚本。

您需要先安装一个扩展,例如 篡改猴暴力猴,之后才能安装此脚本。

您需要先安装一个扩展,例如 篡改猴暴力猴,之后才能安装此脚本。

您需要先安装一个扩展,例如 篡改猴Userscripts ,之后才能安装此脚本。

您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey,才能安装此脚本。

您需要先安装用户脚本管理器扩展后才能安装此脚本。

(我已经安装了用户脚本管理器,让我安装!)

您需要先安装一款用户样式管理器扩展,比如 Stylus,才能安装此样式。

您需要先安装一款用户样式管理器扩展,比如 Stylus,才能安装此样式。

您需要先安装一款用户样式管理器扩展,比如 Stylus,才能安装此样式。

您需要先安装一款用户样式管理器扩展后才能安装此样式。

您需要先安装一款用户样式管理器扩展后才能安装此样式。

您需要先安装一款用户样式管理器扩展后才能安装此样式。

(我已经安装了用户样式管理器,让我安装!)

// ==UserScript==
// @include      *read*tid*
// @include      *thread*
// @include      *forum*fid*
// @include      *tieba.baidu.com/p/*
// @exclude      *.google.*
// @name BBS NoWater
// @author tumuyan
// @version 0.2
// @namespace   http://userscripts.org/users/tumuyan
// @description 吃掉纯图和纯表情回复,支持百度贴吧和phpwind/discuz的某些版本

// ==/UserScript==
var posttext=document.querySelectorAll(".l_post")

i=posttext.length
if (i)
{
    for (i=i-1;i>0;i--)
    {
    	try {if (posttext[i].querySelectorAll(".d_post_content")[0].innerText.match(/^\s*$/)) {posttext[i].innerHTML='' }}catch(err){}     
     }
}


var posttext=document.querySelectorAll("div[id^='post_']")

i=posttext.length
if (i)
{
    for (i=i-1;i>0;i--)
    {
        try {if (posttext[i].querySelectorAll("div[id^='postmessage_']")[0].innerText.match(/^\s*$/)) {posttext[i].innerHTML='' } }catch(err){}     

    }
}



var posttext=document.querySelectorAll('div[class="mainbox viewthread"]')

i=posttext.length
if (i)
{
    for (i=i-1;i>0;i--)
    {
        try {if (posttext[i].querySelectorAll("div[id^='postmessage_']")[0].innerText.match(/^\s*$/)) {posttext[i].innerHTML='' } }catch(err){}     

    }
}


var posttext=document.querySelectorAll(".read_t")

i=posttext.length
if (i)
{
    for (i=i-1;i>0;i--)
    {
        try {if (posttext[i].querySelectorAll(".tpc_content")[0].innerText.match(/^\s*$/i)) {posttext[i].innerHTML='' } }catch(err){}     
     }
}