Premshree Pillai ([info]premshree) wrote,
@ 2005-06-17 13:10:00
Previous Entry  Add to memories!  Tell a Friend!  Next Entry
Current music:Queen - I Want To Break Free
Entry tags:code, firefox, greasemonkey, hacks, mozilla, slashdot, tech

Skip Slashdot Comment Preview

On any of Slashdot’s Post Comment pages—this, for example:

...
Logged-in users aren't forced to preview their comments.
...

Now forcing users—whether Anonymous Cowards or not—to preview sucks. I hate it. And it’s stupid considering I can get rid of it. Here’s the Greasemonkey script you’d require. It adds a ‘Submit’ button on the page, and sets a hidden variable op—which, apparently, Slashdot uses to identify whether it’s a preview, or submit, or whatever—set to value Submit.

Well, I thought that alone would have done the job. Turned out there’s some more weird shit that it does internally—and I’m not terribly sure what all. My guess is that it does some session stuff, where it sets some flag to indicate that the comment-to-be-posted has been previewed. So, the script, when you click on submit, first does a xmlhttpRequest with op=Preview, and then submits the form. Seems to work.

That’s it from Monkeyland for now.



(Post a new comment)


[info]teemus
2005-06-17 08:04 am UTC (link)
Hahahaha. Like your ideas.

(Reply to this)


[info]hitchhiker
2005-06-18 01:47 pm UTC (link)
Very nice! I really ought to learn my way around greasemonkey.

(Reply to this)

YetAnotherGreaseMonkey Script ;)
(Anonymous)
2005-06-19 09:40 pm UTC (link)
Funny is your struggle with slashdot :D
Ok, I just finished my first greasmonkey script. Its something like the google autofill tool, it can autofill webforms (CTRL+Shift+U)

Take a look:
http://boastology.com/blog/post/index/122/myAutoFill-GreaseMonkey

- Kailash

(Reply to this)

mynalzak2
(Anonymous)
2006-12-31 03:48 am UTC (link)
Hi all!

mynalzak8

Bye

(Reply to this)


Create an Account
Forgot your login?
Login w/ OpenID
English • Español • Deutsch • Русский…