UserScripts > Report Spammer

By Avindra V.G. Last update Aug 28, 2009 — Installed 194 times.

Bugs

in
Subscribe to Bugs 6 posts, 2 voices



JoeSimmons Scriptwright

This topic is for bugs only

  • NEW Adds "null" at the end of the post if I don't put in a specific message.

 
Avindra V.G. Script's Author

my bad, i changed the "+" to a "*" so it looks for entirely empty strings in addition to just whitespace

 
JoeSimmons Scriptwright

It seems to be still doing it. It only does it when I click cancel instead of ok on the prompt window. I used a really simple method to fix this. I used || ''. Change line 20 to this:

var comments=prompt("Any specific comments about spammer \""+spammer+"\"?") || '';


It also didn't include a link in one of my spam reportings here. No error in console on that one. When I edit that post, I see the link is there yet there's no text for the link so it can't show it. Maybe you filter out url texts on links? I didn't really observe the source code much so I don't know.

 
JoeSimmons Scriptwright
FirefoxWindows

BUMP - It still adds null as a message if you click cancel when it asks for any specific notes. The fix is above still, as it has been for months.

 
Avindra V.G. Script's Author
FirefoxWindows

I don't think so.... this line:


	if (!/^\s*$/g.test(comments)) report += "\n" + comments;

Checks for whitespace or an empty string message. Are you using the latest version?

EDIT: Oh, I see now. You clicked "cancel", lol. Updated.

 
JoeSimmons Scriptwright
FirefoxWindows

lol thanks :)

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