6

This question aims to serve as a reference list of all current Stack Exchange sites for use in scripts.

1

1 Answer 1

10

You don't need to support alias domains. They redirect to *.stackexchange.com domains, anyway.

This will match all current Stack Exchange sites. It uses @match for smarter domain and path wildcards. @match also works better for Chrome:

// @match       *://*.askubuntu.com/*
// @match       *://*.mathoverflow.net/*
// @match       *://*.serverfault.com/*
// @match       *://*.stackapps.com/*
// @match       *://*.stackexchange.com/*
// @match       *://*.stackoverflow.com/*
// @match       *://*.superuser.com/*

Although, for slightly better speed and to help avoid unexpected results, you should also exclude some sites (Namely: The API, the main blogs1, SEDE, and the "all sites" pages) unless you are specifically coding for them. Their structure and purpose is markedly different.

So use:

// @match       *://*.askubuntu.com/*
// @match       *://*.mathoverflow.net/*
// @match       *://*.serverfault.com/*
// @match       *://*.stackapps.com/*
// @match       *://*.stackexchange.com/*
// @match       *://*.stackoverflow.com/*
// @match       *://*.superuser.com/*
// @exclude     *://api.stackexchange.com/*
// @exclude     *://blog.*.com/*
// @exclude     *://chat.*.com/*
// @exclude     *://data.stackexchange.com/*
// @exclude     *://elections.stackexchange.com/*
// @exclude     *://openid.stackexchange.com/*
// @exclude     *://stackexchange.com/*

As a practical start for most scripts.


Note that onstartups no longer needs to be supported.

1 The "not so main" blogs are all/mostly on a separate domain: blogoverflow.com.

0

You must log in to answer this question.

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