api February 18, 2011

Stack Apps and Scripts

As part of our ongoing improvement to our 1.1 API release, and the site that supports our API, stackapps.com, we’ve extended Stack Apps to support the listing of browser scripts. Since Stack Overflow began, there have been tons of nifty browser scripts people have created to enhance their experience — and they usually work on…
Avatar for Jeff Atwood
Co-Founder (Former)

As part of our ongoing improvement to our 1.1 API release, and the site that supports our API, stackapps.com, we’ve extended Stack Apps to support the listing of browser scripts.

Since Stack Overflow began, there have been tons of nifty browser scripts people have created to enhance their experience — and they usually work on any site in our network. In fact, you may remember that the favorite / ignored tags feature now built into every site originally started life as a user script listed on userscripts.org by Jonathan Buchanan aka insin.

We’re making user scripts a first class citizen on Stack Apps by …

  • giving them their very own script tab on the homepage powered by the [script] tag.

  • updating the /faq and introductory messages to emphasize that browser scripts which enhance the Stack Exchange experience are welcome, even if they don’t technically use the API.

  • continuing to publicize the cool and useful scripts our community is creating from within our own community.

If you’re wondering how browser scripts work, the good news is that
GreaseMonkey support is almost standard across most major browsers now. We updated the script tag wiki to walk you through the process of installing user scripts in your browser. It’s easy — really!

Take Ned Batchelder’s script on How to not get reputation points on Stack Overflow, for example:

// ==UserScript==
// @name No answering on Stackoverflow
// @namespace http://nedbatchelder.com/greasemonkey
// @description Hide the answer box on Stack Overflow
// to stop obsessive behavior
// @include http://stackoverflow.com/*
// ==/UserScript==

GM_addStyle(
"@namespace url(http://www.w3.org/1999/xhtml); " +
".question-page #post-form { display: none; }"
);

That’s a very, very simple browser user script which hides the question answer form on Stack Overflow. If you’re using Google Chrome for example, all you need to do to install that little fragment of code in your web browser is click the no-so-answers.user.js link — like so:

User scripts can be managed by clicking the wrench icon in the toolbar and selecting Tools | Extensions, or of course by entering chrome://extensions in the title bar.

That’s how easy it is!

We’ve already contacted everyone via email who had user scripts posted on Meta Stack Overflow. We’d like to get those all migrated to Stack Apps so the community has one place to go for a centralized directory of cool, useful scripts that make our sites work better.

So if you have a cool user script that works on a Stack Exchange site, and you think others might find it useful or interesting, please list your script on Stack Apps!

Podcast logo The Stack Overflow Podcast is a weekly conversation about working in software development, learning to code, and the art and culture of computer programming.

Related

Wooden figures standing in a circle facing each other
the-loop May 26, 2020

The Loop, May 2020: Dark Mode

We received a bunch of requests to share how we use our feedback framework on specific features. We got excited about this, and given that we just released Dark Mode (and “Ultra Dark Mode”), we thought this was a great opportunity to show how we arrived at our solution.
Avatar for Sara Chipps
Director of Product, Community
code-for-a-living June 23, 2020

Is it time to give Drupal another look?

For many people discussion of content management systems raises unpleasant specters of the early 2000s. But while CMS platforms may not feel like the shiniest new tech on the block, they still have a lot to offer, and they've evolved in ways that might surprise you. Let's talk about Drupal, a 20 year old open source project that still manages to be on the leading edge of the CMS world.