2

When I favor a question sometimes; I would like to be able to favor the question when I am browsing on the questions menu; as supposed to clicking the question and then favoring. I was wondering if I am the only one who feels this way as well, how can I move forward to get this changed?

Please and thank you. :)

GC

  • Updated with a Greasemonkey script! – Oli Sep 7 '10 at 19:35
2

You probably won't get support for this. Even if you do have local support here, you'd need somebody at StackOverflow Inc to push the change and they'd probably have to implement it over all sites.

However you could implement this for yourself using a greasemonkey script. The pages already have jQuery running on them so I imagine it would be pretty simple to:

  1. Loop over $('.question-summary') and for each element:
  2. Pull out the question-ID from the element ID attribute
  3. Add a link to the box.
  4. Bind the link's click action to throw a request to one and then add a link that does an AJAX POST to http://ubuntu.stackexchange.com/posts/<Question ID>/vote/5

I'd write you a full script if I had any free time at the moment but hopefully this is enough of a clue for somebody to pump something out in a few minutes. Or you if you've any experience with jQuery... It's really not that hard once you know what you need to do.

Edit: Found some time. Greasemonkey script awaiting you: http://userscripts.org/scripts/show/85630

It can be better. It doesn't show if you have already favourited a question and that means that if you click it again, you un-favourite it.

I'm trying to work out a way that the script can find out if a question is favourited or not. At the moment, the only way I can think is to load the whole question page up (behind the scenes, of course) and extract some javascript showing the vote-status. This would mean doing 30-100 extra requests per page. I'm certain the Stackoverflow servers would melt if more than a dozen people had a script like that.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .