Take the 2-minute tour ×
Stack Apps is a question and answer site for apps, scripts, and development with the Stack Exchange API. It's 100% free, no registration required.

The tag is to be used for complete userscripts. It would also feel kind of pollutive to swamp it with lots of smallish submissions.

Hencewhy I'm making this proposal as reference question to collect:

  • small user scripts
  • or one-liners
  • scripts with too little incentive to complete, or which require collaboration
  • prototypes
  • mostly cosmetic changes, or even just user stylesheets

I'm certain other people have a few which fail the usual StackApp requirements, but might be interesting to share anyway. (Also, I have some I want to dump here.)

share|improve this question
    
Sounds like a good idea. –  Nathan Osman Mar 29 '11 at 17:14
add comment

2 Answers

This would actually warrant a separate post. But I can't be bothered to make it look nice. So, if anyone wants to pick it up..

Question voting from the main view

So it was 23:57 and I forgot to spend all my votes for the day. Obviously I didn't write this script right then, but laboriously clicked through interesting questions to upvote one by one. But to save future effort I made this script which adds upvote links directly to the main view / question lists. It's a workaround for one of the issues raised in Why aren't people voting for questions?

// ==UserScript==
// @name           Temp
// @description    Cheats
// @include        http://*stackexchange.com/*
// @include        http://*stackoverflow.com/*
// ==/UserScript==

(function(){
    /***** if ((new Date).getUTCHours() >= 22) *****/

    // voting from main
    $("div.question-summary").each(function(){
         var id = this.id.substr(17);
         if (id)
         $(this).find(".vote-count-post").append("<sup style='opacity:0.3'>+</sup>").click(function() {

              var url = "/posts/"+id+"/vote/2";

              // send POST request to /posts/ID######/vote/2
              $.ajax({
                  type: "POST",
                  url: url,      //   #2=up, 3=down, 0=cancel
                  data: { fkey: StackExchange.options.user.fkey },
                  dataType: "json",
                  success: function(result) {
                      if (result.Success) {    // colorful result
                         $("#question-summary-"+id+" .vote-count-post strong").text(result.NewScore).css({color:"orange"});
                      }
                      else {
                         alert("error occured: " + $.param(result));
                      }
                  },
                  error: function (x, r, e) {
                      alert("error="+r +" status="+x.status +" exception="+e);
                  }
              });

         });
    });

})()

License

Public Domain

Status

unsupported

share|improve this answer
    
this is "small"? –  Jeff Atwood Jul 11 '11 at 16:53
add comment

Probably making myself unpopular again. But this one-liner just adds the old ✉ envelope back.

Meanwhile I find the new activity popup more useful than the old /recent page. But I do like UI clutter, and still enjoy the retro look of the envelope. So here it is:

$("#hlinks span.profile-triangle").text("✉").click(function(){location="/users/recent"}); //.replaceWith('<a href="/users/recent" class="envelope-off profile-triangle">&#9993;</a> ');
share|improve this answer
add comment

You must log in to answer this question.

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