38

Stack Exchange Editor Toolkit Logo

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

Bigger

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
    • Android
    • Oracle
    • SQL/SQLite
    • Windows
    • 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
  • Fixes improperly used contractions

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.

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.

A Note of Warning

One last thing: as this script is entirely based on loosely-constructed regular expressions, it may have unexpected behavior. While I haven't encountered anything too terrible, kindly understand that I am not responsible for any damage caused to posts by its usage and always make sure to check what the script did before (or right after) you submit your edits.

If you are edit-banned for something this script did, please remember this warning.

(You will be automatically reminded once on each new site you visit where you do not have edit privileges that your edits must pass through a queue and that the script may not fix enough of a post to be accepted.)

14
  • I'm having a small problem. The button doesn't actually show up until I click the orange question mark on the right two times...
    – Alex K
    Commented Nov 22, 2014 at 2:24
  • @AlexK That's odd; it should show up immediately. Are there any errors in your browser console?
    – AstroCB
    Commented Nov 22, 2014 at 2:26
  • Something weird is going on here...when I have the console open, it works perfectly. Without the console, when I load the page, about half the times the image doesn't show up...
    – Alex K
    Commented Nov 22, 2014 at 3:24
  • Yup. I just tried this again. What I said is confirmed...which is really weird. What's going on?
    – Alex K
    Commented Nov 22, 2014 at 3:34
  • @AlexK That's odd; you may want to open an issue on GitHub.
    – AstroCB
    Commented Nov 22, 2014 at 15:01
  • @AlexK I think my bug report might be similar to what you're experiencing github.com/AstroCB/Stack-Exchange-Editor-Toolkit/issues/36 Commented Dec 20, 2014 at 5:31
  • 1
    @Sathya awesome - soit should be fixed now?
    – Alex K
    Commented Dec 20, 2014 at 6:57
  • 1
    @AlexK yes, it should. Fetch the latest version, do try it. Commented Dec 20, 2014 at 8:28
  • 1
    Removes "Edit:" and similar modifiers I think the Edit: text can be useful, even if I don't have an example right now. But it highlights the fact that the OP has taken time to improve his question, so I think it's interesting.
    – A.L
    Commented Feb 2, 2015 at 12:14
  • 1
    @A.L It can sometimes be useful, but it's generally frowned upon. If you'd like to disable it, you can remove the edit rule from the App.edits dictionary.
    – AstroCB
    Commented Feb 2, 2015 at 13:46
  • Found an issue: It turns "i.e:" into "I.e:" where it shouldn't. Consider adding this case?
    – AJF
    Commented Jul 12, 2015 at 16:53
  • @AJFarmar Fixed! Thanks, and sorry it took a year for me to get to that simple fix.
    – AstroCB
    Commented Jul 6, 2016 at 6:54
  • Usage gifs links are broken now. How can I use that? Commented Jun 16, 2017 at 13:24
  • Does this still work? Commented Feb 1, 2023 at 4:59

0

You must log in to answer this question.

Browse other questions tagged .