BBS NoWater

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

Aby zainstalować ten skrypt, wymagana jest instalacje jednego z następujących rozszerzeń: Tampermonkey, Greasemonkey lub Violentmonkey.

You will need to install an extension such as Tampermonkey to install this script.

Aby zainstalować ten skrypt, wymagana jest instalacje jednego z następujących rozszerzeń: Tampermonkey, Violentmonkey.

Aby zainstalować ten skrypt, wymagana będzie instalacja rozszerzenia Tampermonkey lub Userscripts.

You will need to install an extension such as Tampermonkey to install this script.

Aby zainstalować ten skrypt, musisz zainstalować rozszerzenie menedżera skryptów użytkownika.

(Mam już menedżera skryptów użytkownika, pozwól mi to zainstalować!)

You will need to install an extension such as Stylus to install this style.

You will need to install an extension such as Stylus to install this style.

You will need to install an extension such as Stylus to install this style.

Będziesz musiał zainstalować rozszerzenie menedżera stylów użytkownika, aby zainstalować ten styl.

Będziesz musiał zainstalować rozszerzenie menedżera stylów użytkownika, aby zainstalować ten styl.

Musisz zainstalować rozszerzenie menedżera stylów użytkownika, aby zainstalować ten styl.

(Mam już menedżera stylów użytkownika, pozwól mi to zainstalować!)

// ==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){}     
     }
}