Remove men submissions from reddit gonewild *NSFW*

in Ideas and script requests
Subscribe to Remove men submissions from reddit gonewild *NSFW* 11 posts, 4 voices



Bob Loblaw L... User
FirefoxMacintosh

*NSFW*

http://www.reddit.com/r/gonewild/

I'm looking for a way to remove all the men who post in this section.

They are supposed to use: [M] or [Male] but many use male, m, etc.

Thanks for any help,

 
kooks Scriptwright
FirefoxWindows

Wow, haha what a request. Remove entries which have, (m) <m> [m] ' m ' or 'male' anywhere in the title.

// ==UserScript==
// @name           Remove Males From Reddit
// @include http://www.reddit.com/r/gonewild*
// ==/UserScript==

var s = document.evaluate("//a[@class='title ']",document,null,XPathResult.UNORDERED_NODE_SNAPSHOT_TYPE,null);

for (i=0;i<s.snapshotLength;i++) {	
		if (s.snapshotItem(i).textContent.match((/(\[m\]|<m>|[\s]+m[\s]+|\(m\)|cock|male)/i))) {	
		s.snapshotItem(i).parentNode.parentNode.parentNode.style.display = 'none';
	}
}
</m>

 
znerp Scriptwright
FirefoxWindows

@kooks: I've not even checked the link, but that would also match female. Maybe change..

if (s.snapshotItem(i).textContent.match((/(\[m\]|<m>|[\s]+m[\s]+|\(m\)|cock|male)/i)))

..to..

if (/\[m\]|<m>|\s+m\s+|\(m\)|cock|[^(fe)]male/i.test(s.snapshotItem(i).textContent))
 
Bob Loblaw L... User
FirefoxMacintosh

thanks for the help to the both of you, but after trying both versions there are still quite a few male submissions making it through. the ones that did have the following:

[male]
[M]
[m]

thanks.

 
znerp Scriptwright
FirefoxWindows

I've just tried it using my snippet and it works fine for me...

var s = document.evaluate("//a[@class='title ']",document,null,XPathResult.UNORDERED_NODE_SNAPSHOT_TYPE,null);

for (i=0;i<s.snapshotLength;i++) {	
	if (/\[m\]|<m>|\s+m\s+|\(m\)|cock|[^(fe)]male/i.test(s.snapshotItem(i).textContent)) {	
		s.snapshotItem(i).parentNode.parentNode.parentNode.style.display = 'none';
	}
}
 
Bob Loblaw L... User
FirefoxMacintosh

thanks for the help znerp. I'm using Grease Fire so I right clicked the monkey in the bottom right and went to new user script, went through the motions. Copy & pasted your script, and made sure it was enabled.

however, those submissions are still getting through. however, if it's working on your end I'm screwing something up. Just gotta trouble shoot.

 
znerp Scriptwright
FirefoxWindows

Ok, I see what you did; you're trying it logged in whilst we're not. I've just used BugMeNot to get in, and to fix it just change the first line to this...

var s = document.evaluate("//a[starts-with(@class,'title ')]",document,null,XPathResult.UNORDERED_NODE_SNAPSHOT_TYPE,null);
 
Bob Loblaw L... User
FirefoxMacintosh

znerp: mad props. works like a charm.

can this be posted some how for greasefire to pick up? there are a ton of gone wild users who would love to have this :)

thanks again,

 
znerp Scriptwright
FirefoxWindows

If you upload it as a script (assuming kooks is alright with that), it should show up in the Greasefire thing. I'd do it myself but I really don't want any angry horny users to complain at me if/when it breaks.

 
sizzlemctwizzle Scriptwright
FirefoxMacintosh

znerp wrote:
I'd do it myself but I really don't want any angry horny users to complain at me if/when it breaks.

ROFL!!!

 
kooks Scriptwright
FirefoxWindows

Hahaha, thanks znerp for that fix, I need to work on my regex. Bob Loblaw feel free to do what you want with it.

Cross
Presentational HTML allowed.
Use <code> for inline code and <pre> for code blocks. Use &lt; and &gt; for literal < and >.
We help break paragraphs and link your links.
or cancel