Skip to main content
1 of 12
AstroCB
  • 913
  • 5
  • 11

Stack Exchange Editor Toolkit

This userscript is a revival of sorts for the old SE Editor Toolkit, which was abandoned some time ago.

It only really provides the autocorrect aspect for the foreseeable future, which I find to be quite useful.

It works by injecting a button in the edit window (it works inline for users with full edit privileges and on edit pages for users without them) that corrects common errors based on current Stack Exchange standards and formulates an edit summary based on the changes.

Usage

Usage

Rules

It currently does the following:

  • Uppercases lowercase "i"s in posts
  • Corrects to proper spelling/capitalization of "Stack Overflow" and "Stack Exchange" in order to fit the legal naming requirements
  • Expands "SO" and "SE" to "Stack Overflow" and "Stack Exchange," respectively
  • Corrects to proper spelling/capitalization of...
  • JavaScript
  • JSFiddle
  • jQuery
  • HTML
  • CSS
  • JSON
  • AJAX
  • AngularJS
  • PHP
  • Upvote/Downvote
  • Capitalizes the first letter of new lines
  • Removes common greetings
  • Removes "thanks" and similar phrases
  • Removes "Edit:" and similar modifiers
  • Replaces the now-banned mysite.domain with example.domain

Expandability

See something you don't like? Want to add something?

Well, the toolkit is easily expanded/modified. Rules are in the following format (located in the edits dictionary):

anArbitraryName: {
        expr: /aRegularExpressionForMatching/,
        replacement: "What to replace it with (may include captured text like $1)",
        reason: "an unpunctuated reason starting with a lowercase letter that will be formatted automatically and inserted into the edit summary"
},

Download

Click here for a direct download of the current version (1.0).

Contribute

The code is available on GitHub (feel free to make pull requests with new rules if you're into that sort of thing).

Please post reports of bugs/strange behavior on the GitHub page as an issue or here as an answer or comment.

AstroCB
  • 913
  • 5
  • 11