72

Looking for Maintainer

I have not had the capacity to maintain this project in any meaningful way, but the source code is quite clear and reasonably well documented. If you would be interested to maintain this project, please apply on GitHub via an issue.

This project has currently fallen so behind Stack Exchange, that it currently doesn't do anything useful. Former description follows:


There's been an onslaught of rather difficult to read questions on SO lately. A lot of them are just plain close-fodder, but many are just from d ppl ,who spk teh internetz lingo and hence make my eyes bleed are pretty much incomprehensible without extensive parsing/editing. They also somehow do not manage to grasp basic markdown. Now manually editing all these answers can often be a massive pain, so I wrote this extension.

Screenshot

It adds a few more buttons to the SE edit pages (so no distractions when just posting) that aid in making these sites awesome.

Autocorrect

This is the main tool of the suite. It is in fact a huge collection of regexps that correct the most common mistakes people commonly make on SO. These include (see the source for full details):

  • correcting capitalization (how do i do jquery. help. => How do I do jQuery. Help.)
  • correcting use of apostrophes (im cant hasnt => I'm can't hasn't)
  • correcting basic punctuation (what ? how.does......this => What? How. Does... This)
  • deleting unnecessary greetings or signs of gratitude

Note: These are Regexps, not any smart NLP so check the post so that you don't screw anything up. For that it provides:

Realtime diff

There's a handy link provided that toggles between the realtime preview and a realtime diff of your changes and the original version. All of the automated functions also automatically display the diff after execution.

Lowercasing

Sometimes people JUST CAN'T HELP SHOUTING! There's a handy button that converts selected text to lowercase, or finds sequences of shouting and lowercases them automatically.

Search & Replace

Sometimes a simple regexp can fix a lot of problems instantaneously. Click on the search button and get the Search & Replace interface:

Screenshot of Search & Replace

JS regexp support. Did I mention insta-diffing?

Code-sanetm

Sometimes people Copy-paste their code and it gets all messy. This replaces tabs with four spaces and realigns all code to the four space offset, making reformatting it a breeze. Also autoindents C-like languages to further ease the pain.

Where can I get it?

Note: I no longer have the resources to maintain the suite. I'm sure that making this a working user script would not take too much effort so pull requests with fixes are most welcome.

Gotchas

  • Autocorrect and Lowercase ignore code so be sure to mark stuff as code before you apply them.
  • Autocorrect also applies to the title of the post, be sure to check that as well.
  • Filenames sometimes get autocorrected. Mark them as code or correct them back (some common extensions are checked for, but this is by no means comprehensive. If the post is full of filenames, consider not using Autocorrect).

Version History

  • 1.1.0 released 16/3: Fixes a few bugs, adds support for C-like languages to Code-sane, adds quite a few product capitalizations and some determiner handling (an hash a apricot => a hash an apricot).

BTW does the auto-update system work?

16
  • 21
    +1e100 Where should I send the cash (1/2 now, 1/2 when the userscript version is available)? ;) Seriously, this should be integrated into the site software. Commented Mar 15, 2011 at 17:25
  • 7
    This is incredibly useful! +100 Commented Mar 15, 2011 at 20:48
  • @Dori Of course not! Post them either here or at github.com/gampleman/SE-Editor-Toolkit/issues. Commented Mar 16, 2011 at 0:21
  • I have converted this into a UserScript, which you can find in my answer below. Commented Mar 16, 2011 at 1:24
  • @George Care to add it to the github repository? As the conversion looks more or less like a fairly straightforward (= automatable) process I could update both simultaneously. Commented Mar 16, 2011 at 1:25
  • 1
    @Jakub: Actually... it's not as easy as it looks. (I had to make quite a few subtle modifications.) But I'm thinking of setting something up on my server that automatically pulls the changes from GitHub and rebuilds the UserScript every so often. Commented Mar 16, 2011 at 1:28
  • 1
    @Jakub: ...and done! Every 24 hours, this file will be generated from the GitHub repos. Commented Mar 16, 2011 at 19:15
  • @George Awesome! I updated the link in the post. Also thanks to Hans for helping me optimize some stuff: stackoverflow.com/questions/5324757/… Commented Mar 16, 2011 at 22:01
  • +∞ :) The only bad thing about this is that people that uses this will stop editing questions :/ Commented Apr 29, 2011 at 15:09
  • 5
    I can't seem to get it to work on chrome, can you help? Commented Dec 16, 2011 at 21:27
  • @Truth I haven't done much maintenance on this script for a while. Are you using it as a plugin or as a UserScript? Commented Dec 16, 2011 at 22:15
  • as a UserScript Commented Dec 16, 2011 at 22:15
  • FWIW There's a desktop port of it that I had initially developed and works well for me github.com/SathyaBhat/StackEd Commented Dec 17, 2011 at 18:53
  • Would really love a working userscript version, if anyone finds the time to make it :)
    – Emil
    Commented Feb 15, 2013 at 13:27
  • 5
    Will this ever be a userscript again? Commented May 27, 2013 at 5:16

8 Answers 8

27

Deprecated.

I'm afraid I've sort of abandoned my UserScript conversion of this extension. It was quite buggy and extremely difficult to debug. It would take less effort to write a UserScript version from scratch. – George Edison♦ Dec 20 '11 at 0:51

See new script here Stack Exchange Post Editor - Performing Basic Corrections on Posts Automatically


I quickly adapted this into a UserScript which you can get here:

http://files.quickmediasolutions.com/userscripts/edit_tools.user.js

An automated build can be obtained here:

http://quickmediasolutions.com/repos/output.user.js

The above script is automatically generated every 24 hours from the GitHub repo.

24
  • +1e100 I see you went after the other half of the cash! See my "answer" for a bug report. I don't know if it's specific to your version or also applies to the original. Commented Mar 16, 2011 at 1:34
  • 1
    @Dennis: Please take a look at the note I added to this post. Commented Mar 16, 2011 at 19:16
  • In his updated original post, Jakub asks "BTW does the auto-update system work?" Is this functional in your build for the end user (e.g. me)? Commented Mar 20, 2011 at 20:07
  • @Dennis: It should be. I just checked and it seems like the build script is functioning as expected. Commented Mar 20, 2011 at 20:33
  • So I don't need to manually update? Commented Mar 20, 2011 at 20:37
  • @Dennis: Sorry, yes - you do need to update. What is meant by 'auto-update' is that the script you update from is itself updated daily directly from the source code on GitHub. Commented Mar 20, 2011 at 21:00
  • OK, since Jakub didn't qualify his question I though he meant that code had been added to auto-update the end-users installed copy. Sorry for the confusion. Commented Mar 20, 2011 at 21:12
  • @Dennis: No problem. I understand the confusion - although an auto-update for the installed copy would be nice! Commented Mar 20, 2011 at 21:18
  • @Dennis the autoupdating I had in mind is a Safari feature that should automatically update the extension based on this file gampleman.github.com/SE-Editor-Toolkit/updates.plist Commented Mar 22, 2011 at 16:34
  • The userscript doesn't seem to work - have tried in Firefox 3.6 and 4.0...
    – studiohack
    Commented Mar 26, 2011 at 6:52
  • @studiohack: What errors do you get when running the script? Commented Mar 26, 2011 at 19:34
  • @GeorgeEdison: I don't get anything, nothing shows up at all...I've seen screenshots of what it is supposed to look like, but nothing seems to appear...I've had several other users (on SU) also say the same thing...
    – studiohack
    Commented Mar 26, 2011 at 19:41
  • @studiohack: It currently only works on Meta.SO. Commented Mar 26, 2011 at 20:26
  • 1
    @Jakub: I haven't had time to set that up yet. But it's planned. Commented Mar 27, 2011 at 16:43
  • 2
    As per @Sathya's bug report below, is there any chance of fixing this for inline editing? Can't get it to work on Chrome Dev.
    – slhck
    Commented Aug 25, 2011 at 10:55
14

Bug report: Inline editing breaks this :-(

8

Bug report:

Using George Edison's UserScript version. FF4.0 windows Vista - nothing shows up in the toolbar. The same installation on chrome (10.0l.648.204) is intermittent - sometimes the buttons show up and sometimes they don't.

15
  • I can also confirm the lack of buttons using Firefox 4 on Vista. Commented Apr 3, 2011 at 18:47
  • 1
    @Iain, @Ben: I think I have fixed both of these problems now and the script should work now. Commented Apr 6, 2011 at 3:38
  • @GeorgeEdison: Thanks for looking at this. Unfortunately FF 4.0 still doesn't show any auto correct button.
    – user1150
    Commented Apr 6, 2011 at 15:12
  • @Iain: Are any errors reported in the error console? Commented Apr 6, 2011 at 17:10
  • @GeorgeEdison: The only error I see is document.querySelector("#wmd-button-row") is null
    – user1150
    Commented Apr 6, 2011 at 17:34
  • @Iain: Then it isn't an error with my packaging. Commented Apr 6, 2011 at 18:15
  • Same problem here, FF 4 on Mac OS X Snow Leopard
    – CharlesB
    Commented Apr 13, 2011 at 8:21
  • :-( @GeorgeEdison I can't get the userscript to work in Greasemonkey on FF4.0 either Commented Apr 29, 2011 at 5:10
  • @Sathya: I know... it's quite a big disappointment. I really am having a terrible time debugging it just to find out what's going wrong. Commented Apr 29, 2011 at 5:15
  • @GeorgeEdison Okay :( Commented Apr 30, 2011 at 6:34
  • @Sathya: Any help that anyone can provide in regards to making debugging easier would be appreciated, so hopefully someone will be able to figure out what's going on. Commented Apr 30, 2011 at 6:44
  • @Sathya: @GeorgeEdison: Today's 4.01 update to FF doesn't help either.
    – user1150
    Commented Apr 30, 2011 at 6:49
  • @GeorgeEdison - I can try to help but don't know where to start :-s Commented Apr 30, 2011 at 7:06
  • @GeorgeEdison Has any progress been made? Buttons still don't show up on Chrome version 16.0
    – wizlog
    Commented Dec 19, 2011 at 22:18
  • 1
    @wizlog: I'm afraid I've sort of abandoned my UserScript conversion of this extension. It was quite buggy and extremely difficult to debug. It would take less effort to write a UserScript version from scratch. Commented Dec 20, 2011 at 0:51
2

I just installed the latest userscript version and I don't get a toolbar for Super User or Stack Apps. Server Fault and Stack Overflow do work. I haven't tried any others.

5
  • I just installed the latest version and I can't reproduce. What browser / OS / etc. are you using? Commented Mar 20, 2011 at 5:32
  • @George: Chrome (Beta) on Vista. I just tried it on Photography and Game Development. In both cases, a toolbar appeared if I tried to edit a question, but not if I tried to edit an answer. Commented Mar 20, 2011 at 10:33
  • Aha! I can reproduce the problem editing answers on Photo.SE. Looking into it... Commented Mar 20, 2011 at 19:35
  • Seems to be a problem with the script and not my packaging, so I'll let @Jakub look into it. Commented Mar 20, 2011 at 19:40
  • Should be fixed in the source now, coming to a release near you soon. Commented Mar 22, 2011 at 16:35
1

Feature request:

Make the case-change button do a three way toggle: lower, title and upper (probably in that order).

lower case
Title Case
UPPER CASE

There are occasionally legitimate needs for all caps.

7
  • Are there? Isn't usually bold face better? Also see github.com/gampleman/SE-Editor-Toolkit/issues#issue/1. Commented Mar 16, 2011 at 2:05
  • @Jakub: Title case definitely has its uses. All caps is useful sometimes for input data or in source code. Let's see if my suggestion gets any upvotes. Commented Mar 16, 2011 at 2:28
  • 2
    [status-completed] Commented Mar 17, 2011 at 18:12
  • @Jakub: Could the tool-tip be changed to more accurately describe the new functionality? Commented Mar 19, 2011 at 21:26
  • To what? Change case? Sounds kinda weird. Commented Mar 19, 2011 at 21:41
  • @Jakub: I don't know why that sounds weird, but some combination of change/toggle and case/capitalization or some variation perhaps. Maybe somebody will come along with a better idea. Commented Mar 19, 2011 at 22:13
  • @Dennis I'm hoping to get some proper icons for a near future release so I'll add it to that. Commented Mar 19, 2011 at 22:44
0

Bug report:

Using George Edison's UserScript version Replace & Find doesn't update the diff, but Replace All does. I don't know if this applies to the original version or not.

1
  • 3
    [status-completed] Commented Mar 16, 2011 at 2:05
0

Bug Report:

It doesn't seem to work on StackApps. I don't get the added buttons in the toolbar.

As always, I'm reporting this against George's version without knowing whether it applies to the original.

In case I haven't said it already:

Thanks Jakub and George!

3
  • 1
    I fixed this problem in my UserScript. Commented Mar 16, 2011 at 4:52
  • Also added askubuntu.com and answers.onstartups.com. Any other SE site I'm missing? Commented Mar 16, 2011 at 19:06
  • @Jakub: Ya, I noticed that and added askubuntu.com to the packaging. I don't think you're missing any others. Commented Mar 20, 2011 at 19:40
0

Bug Report: (using George Edison's UserScript)

Diff ignores changes in whitespace, making indentation changes fairly invisible.

You must log in to answer this question.

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