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

newsletter April 30, 2021

The Overflow #71: Copied and pasted

Welcome to ISSUE #71 of the Overflow! This newsletter is by developers, for developers, written and curated by the Stack Overflow team and Cassidy Williams at Netlify. This week: we know what you copied and pasted last summer, checking out our biggest fans at rest, and the Clapper is back but in your browser this time. Introducing Stack Overflow for…
newsletter April 2, 2021

The Overflow #67: Forget Moore’s Law. Algorithms drive technology forward

Welcome to ISSUE #67 of the Overflow! This newsletter is by developers, for developers, written and curated by the Stack Overflow team and Cassidy Williams at Netlify. This week: inertial navigation, new research from MIT on who’s building our algorithmic commons, plus a conversation with Slack about APIs and open-source. From the blog Forget Moore’s Law. Algorithms drive…