Return Styles: Pseud0ch, Terminal, Valhalla, NES, Geocities, Blue Moon.

Pages: 1-4041-

Filter tripfaggotry script

Name: Anonymous 2008-08-22 7:04

Is there any way of changing this greassmonkey script so that it filters out tripfags instead of sage?

http://userscripts.org/scripts/show/2124

Here's the source code:

// ==UserScript==
// @name          4chan Anonymizer
// @description   Make everyone on 4chan appear as Anonymous - remove all names, tripcodes, and emails other than sage
// @include       http://*.4chan.org/*
// ==/UserScript==

(function() {

         // Remove all linkmail (unless they are being used for sage) and postertrip elements

        var toRemove = document.evaluate(
            "//a[@class='linkmail' and @href!='mailto:sage']|//span[@class='postertrip']",
            document,
            null,
            XPathResult.UNORDERED_NODE_SNAPSHOT_TYPE,
            null);

        var element;
       
        for (var i = 0; i < toRemove.snapshotLength; i++) {
            element = toRemove.snapshotItem(i);
            element.parentNode.removeChild(element);
        }
       
        // Set the contents of all postername, commentpostername, and remaining linkmail elements to Anonymous
       
        var posterNames = document.evaluate(
            "//span[@class='postername' or @class='commentpostername']",
            document,
            null,
            XPathResult.UNORDERED_NODE_SNAPSHOT_TYPE,
            null);

        for (var i = 0; i < posterNames.snapshotLength; i++) {
            element = posterNames.snapshotItem(i);
               setPosternameInnerText(element, 'Anonymous');
        }
       
    function setPosternameInnerText(element, text)
    {
           if (typeof element.innerText != 'undefined')
           {
             element.innerText = text;
           }
           else if (element.hasChildNodes)
           {
             var childNode;
             var linkmailFound = 0;
            
             // Go through the child nodes - remove anything that's not a linkmail element.
             // If linkmail element is found, set its inner text; otherwise, create a new
             // text node for the inner text.
            
             for (var i = 0; i < element.childNodes.length; i++)
             {
                 var childNode = element.childNodes[i];
                
                 if ((childNode.nodeType == Node.ELEMENT_NODE) && (childNode.tagName.toLowerCase() == 'a') && (childNode.getAttribute('class').toLowerCase() == 'linkmail'))
                 {
                     setLinkmailInnerText(childNode, text);
                     linkmailFound = 1;
                 }
                 else
                 {
                     element.removeChild(childNode);
                 }
             }
            
             if ((linkmailFound == 0) && element.appendChild)
                 element.appendChild(document.createTextNode(text));
           }
    }
   
    function setLinkmailInnerText(element, text) {
        if (typeof element.innerText != 'undefined')
        {
             element.innerText = text;
           }
           else if (element.hasChildNodes && element.appendChild)
           {
             while (element.hasChildNodes())
             {
                   element.removeChild(element.lastChild);
             }
            
             element.appendChild(document.createTextNode(text));
           }
    }
       
})();

Name: Anonymous 2008-08-22 7:08

why would you want to filter tripfags

I hate them

Name: Anonymous 2008-08-22 7:09

>>2
Filter out tripfags.

Name: Anonymous 2008-08-22 7:21

Op here, I'm willing to suck dick for this script.

Currently I cant decide which tripfag I'd want to filter out. The script should be versatile (obviously).

I'm going to sleep for now.

Name: Anonymous 2008-08-22 9:46

It seems to me it already filters out names and tripcodes, although I haven't tried it.

You mean you want it to stop removing emails other than sage? Get rid of //a[@class='linkmail' and @href!='mailto:sage']| from the first XPath expression and it won't remove emails any more.

Name: Anonymous 2008-08-22 10:21

OK, since you want to actually remove the content, I'll just add it to the Shiichan post filter1 anyway. Use the following (or whatever):

  filters : [
    function(info) {
      return (info.posterName || "").match(/Sageing\s+fail\s+since\s+1463|EY\s+MEME\s+FAN/);
    }
  ],

_____________
1http://userscripts.org/scripts/show/31838

Name: Sageing fail since 1463 2008-08-22 10:24

>>6
lol, what a fail. Someone needs a sage.
*gives sage to >>6*
Happy now?

Name: Anonymous 2008-08-22 10:35

>>7
Thanks.

Name: Anonymous 2008-08-22 12:36

>>6
I haven't been able to get that to work properly (or at least it doesn't, on my browser). I have NoScript as well, but that wouldn't interfere with greasemonkey, would it?

Is there something I need to configure for the script? By looking at the source, I deduce it's supposed to block DIX posts, but I can still see them.

Name: Anonymous 2008-08-22 13:22

>>9
It's probably using some JavaScript thing your browser doesn't support (I'm using Firefox 3.1 nightlies, and haven't really bothered to test in anything at all that's been released, thought it should work in 3.0 and maybe even 2.0). There may be something useful in your error console or whatever your browser has.

It seems Opera doesn't support JS 1.6 "for each(var x in y)" notation. I'll probably do something about that fairly soon.

If it's working it should block the DIX/That was VIP quality! posts if it's repeated enough times, yes.

Name: Anonymous 2008-08-22 16:37

Op here. I guess I should have tested this script before making this thread. This script doesn't remove post that have sage inside of them. Instead it changes the sage post to non-saged post. I assumed that it was capable of removing the post from the board entirely.

Is there any way of changing the script so that it removes the post from the board? If that's not possible, is there a way to make the script hide and/or alter the post if it has a tripcode in the name field?

For example. If the name field has the username "Desu!3s23ff5r7" it will change the post field to blank. It will be a script that basically ignores the post of tripfags. Such a script would revolutionize 4chan. So again, I'm begging you to create it.

Name: Sageing fail since 1463 2008-08-22 17:02

Saged
Reason: >>11

Name: Yegeeyg feey yeyce EY 2008-08-22 17:07

Yeged
Yeeyet: >>EY

Name: Anonymous 2008-08-22 17:10

>>13
YOU ARE GOD!

Name: Anonymous 2008-08-22 18:50

>>12 The irony.

Name: Anonymous 2008-08-22 22:12

revolutionize 4chan
We already have one of those but Mr VacBob made a sticky telling people not to run it in /b/.

it set 4chan, shii.org (overchan) to 127.0.0.1 in the hosts file

Name: Anonymous 2008-08-23 0:25

>>11
For example. If the name field has the username "Desu!3s23ff5r7" it will change the post field to blank. It will be a script that basically ignores the post of tripfags. Such a script would revolutionize 4chan. So again, I'm begging you to create it.
The script you want already exists. Look closer in userscripts.org (PROTIP: 4channoads). I once wrote an enhanced version of it, though. It removed all posts made by Anonymous of Croatia (annoying /jp/ tripfag), except those where he had posted a link. If he posted an image, it would just erase the contents of the post (so you could still view the image).

By the time I finished writing it, I realized the whole idea was fucking dumb. I was enlightened and deleted it.

In summary, back to /b/, please. You are an idiot if you think FORCED_ANON makes anything better.

Name: Anonymous 2008-08-23 10:17

http://userscripts.org/scripts/review/13602

I wrote that script! Read the source and find the large /* Uncomment this text, but do not uncomment it, uncomment the code after it, from var regexp=/<span class="postertrip">/;
to closing bracket.

Now please go to imageboards and fag them up like you always do anonymous♥

Name: Anonymous 2008-08-23 12:02

>>17
>>18
Your script doesn't seem to be removing their post. All it does is convert their name field to Anonymous.

I want a script that removes their post from the board. Am I doing it wrong?

Also, what lines do I need to change in the script so that it only targets one tripfag.

Fellow /a/sshole and /jp/er here, btw.

Name: Anonymous 2008-08-23 13:32

>>19
I don't want to install greasemonkey to just prove you wrong. My script did remove whole posts when I wrote it, and I believe 4chan didn't change layout of page, so nothing should change.

You are probably doing it wrong.

Maybe try to think about how you can't do such a trivial task yourself and stop wasting your time in /a/ or /jp/ and do something more useful instead. Some of us /prog/ denizens would recommend this: http://mitpress.mit.edu/sicp/

Bye

Name: Anonymous 2008-08-23 14:05

>>20
You're mean.

Shit, is not working; what more can I say? Try it yourself. Help a fellow /jp/er out. In exchange, I give you this:

http://b.imagehost.org/view/0618/565656.jpg

Or... if you're too busy to help me, set me a link to a good JavaScript tutorial and I'll code it myself. (Currently I only know C/C++).

Oh, and one last thing. You'll never escape /a/ and /jp/. No matter how much time it waste, you're going to end up going back to it. Search you heart and you know it to be true.

Name: Anonymous 2008-08-23 15:10

>>19
Your script doesn't seem to be removing their post. All it does is convert their name field to Anonymous.
I'm pretty sure Anonymous of Russian Federation's script, which is the one that was posted, removes the posts. But it's totally pointless to use such a script, unless you enjoy seeing others talking to themselves.

And you don't need a Javascript tutorial. I wrote my Croatia censor without previous Javascript knowledge, I just looked at AoRF's script, looked up the Javascript functions I wanted and figured it out.

You'll never escape /a/ and /jp/.
He got his entire subnet banned from the imageboards. I'm guessing proxying is to much of a bother.

Name: Anonymous 2008-08-23 15:32

>>10
Nothing's in the error console. I'm using Firefox 3 as packaged in UBUNTU, and while some scripts do work, yours and the EXPERT BBCODE FRAMEWORK don't.

Halp?

Name: Anonymous 2008-08-23 16:49

UBANTO

Name: Anonymous 2008-08-23 20:24

>>22
AoRF ;_;

AoRF = Cirno Anonymous of Gensokyo.

Name: Anonymous 2008-08-23 20:27

>>22
You're AoRF. I fucking know it. Where the hell have you been? You were one of the few good tripfags.

Name: Anonymous 2008-08-23 23:44

>>26
He's not. I know because I am. And I have been here all along.

Name: Anonymous 2008-08-24 9:52

>>27
NO ME

Name: The Sussman 2008-08-24 11:50

>>28
Look, you're supposed to pretend being me or Leah Culver, not some random tripfag.

Name: lol !8mQB/2odm6 2008-08-24 12:35

>>29
Despite the Sussman's scathing email to me, I think he'd be sad if we stopped worshipping him.

Name: Anonymous 2008-08-24 13:02

What should happen to a thread started by a tripper? Remove the whole thing or just the original post?

Name: Anonymous 2008-08-24 13:04

>>31
Remove the whole thing.

Name: Anonymous 2008-08-24 13:05

>>31
Ignoring a tripfag means ignoring him. So removing the entire thread would be preferred.

Name: Anonymous 2008-08-24 13:18

>>26
No, I'm >>17,22 (Eksopl, if you really want to know). AoRF is >>18,20. It's funny, because this is the second time I've been accused of being AoRF. I once used another name in /a/, but no one ever figured it out.

>>25
Cirno's definitely not him. I've spoken to Cirno over IM, plus, if you remember their posts from late 2007 and early 2008 on /a/, when they were both really active, it doesn't make any sense at all. Cirno used to give out detailed personal information about himself, stuff that would take too much trouble to make up. And there's no doubt that AoRF is Russian.

Not to mention AoRF is a college student, Cirno was a NEET that was able to post 24/7.

Name: Anonymous 2008-08-24 13:51

>>30
What? The Sussman emailed you? Care to elaborate?

Name: Anonymous 2008-08-24 13:52

>>33
You speak as though threads in /prog/ stay on-topic for more than 5 posts (recent threads notwithstanding).

Name: The Sussman 2008-08-24 14:00

>>35
E dedy'y emeey eyyeye.

Name: Anonymous 2008-08-24 14:18

>>1
document.body.getElementsByTagName('div').filter(
  function(elt){
   return
    elt.className.match(/^post /) &&
    elt.getElementsByTagName('span').filter(
      function(elt){
      return elt.className == 'postertrip'
     })[0].innerHTML != ''
 }).forEach(
  function(elt){
   document.body.removeChild(elt);
  });

Name: Anonymous 2008-08-24 15:33

>>38
Wow, it actually works. Thanks.

Name: Anonymous 2008-08-24 16:03

Name: Anonymous 2008-08-24 16:58

>>32
Remove the whole thing.
No one will use that shit for more than 10 minutes, not even you. Even with the original script, you'll get sick of missing out on 10% of the posts. I can't even imagine what it'd be like to miss out on entire threads.

4chan has a lot of problems, but tripfags are the least of its worries.

Name: Anonymous 2008-08-24 19:12

>>38
Earlier in this thread I said I'd be willing to suck dick for this script: >>4

So I've come back here to collect the said dick.

Name: Anonymous 2008-08-24 19:15

>>38
One question about this script. How do I change it so that it only targets one tripfag?

I fail at /prog/....

Name: Anonymous 2008-08-24 19:28

>>43
You fail at javascript. Read SICP, then K&R, and you'll know javascript.

Name: Anonymous 2008-08-24 19:54

>>43
s/!= ''/== '!faggot'/

Name: Anonymous 2010-12-09 12:01


Don't change these.
Name: Email:
Entire Thread Thread List