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. Mar 15, 2011 at 17:25
  • 7
    This is incredibly useful! +100 Mar 15, 2011 at 20:48
  • @Dori Of course not! Post them either here or at github.com/gampleman/SE-Editor-Toolkit/issues. Mar 16, 2011 at 0:21
  • I have converted this into a UserScript, which you can find in my answer below. 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. 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. Mar 16, 2011 at 1:28
  • 1
    @Jakub: ...and done! Every 24 hours, this file will be generated from the GitHub repos. 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/… Mar 16, 2011 at 22:01
  • +∞ :) The only bad thing about this is that people that uses this will stop editing questions :/ Apr 29, 2011 at 15:09
  • 5
    I can't seem to get it to work on chrome, can you help? 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? Dec 16, 2011 at 22:15
  • as a UserScript 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 Dec 17, 2011 at 18:53
  • Would really love a working userscript version, if anyone finds the time to make it :)
    – Emil
    Feb 15, 2013 at 13:27
  • 5
    Will this ever be a userscript again? 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. Mar 16, 2011 at 1:34
  • 1
    @Dennis: Please take a look at the note I added to this post. 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)? Mar 20, 2011 at 20:07
  • @Dennis: It should be. I just checked and it seems like the build script is functioning as expected. Mar 20, 2011 at 20:33
  • So I don't need to manually update? 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. 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. Mar 20, 2011 at 21:12
  • @Dennis: No problem. I understand the confusion - although an auto-update for the installed copy would be nice! 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 Mar 22, 2011 at 16:34
  • The userscript doesn't seem to work - have tried in Firefox 3.6 and 4.0...
    – studiohack
    Mar 26, 2011 at 6:52
  • @studiohack: What errors do you get when running the script? 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
    Mar 26, 2011 at 19:41
  • @studiohack: It currently only works on Meta.SO. Mar 26, 2011 at 20:26
  • 1
    @Jakub: I haven't had time to set that up yet. But it's planned. 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
    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. 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. 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
    Apr 6, 2011 at 15:12
  • @Iain: Are any errors reported in the error console? Apr 6, 2011 at 17:10
  • @GeorgeEdison: The only error I see is document.querySelector("#wmd-button-row") is null
    – user1150
    Apr 6, 2011 at 17:34
  • @Iain: Then it isn't an error with my packaging. Apr 6, 2011 at 18:15
  • Same problem here, FF 4 on Mac OS X Snow Leopard
    – CharlesB
    Apr 13, 2011 at 8:21
  • :-( @GeorgeEdison I can't get the userscript to work in Greasemonkey on FF4.0 either 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. Apr 29, 2011 at 5:15
  • @GeorgeEdison Okay :( 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. Apr 30, 2011 at 6:44
  • @Sathya: @GeorgeEdison: Today's 4.01 update to FF doesn't help either.
    – user1150
    Apr 30, 2011 at 6:49
  • @GeorgeEdison - I can try to help but don't know where to start :-s Apr 30, 2011 at 7:06
  • @GeorgeEdison Has any progress been made? Buttons still don't show up on Chrome version 16.0
    – wizlog
    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. 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? 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. Mar 20, 2011 at 10:33
  • Aha! I can reproduce the problem editing answers on Photo.SE. Looking into it... 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. Mar 20, 2011 at 19:40
  • Should be fixed in the source now, coming to a release near you soon. 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. 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. Mar 16, 2011 at 2:28
  • 2
    [status-completed] Mar 17, 2011 at 18:12
  • @Jakub: Could the tool-tip be changed to more accurately describe the new functionality? Mar 19, 2011 at 21:26
  • To what? Change case? Sounds kinda weird. 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. 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. 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] 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. Mar 16, 2011 at 4:52
  • Also added askubuntu.com and answers.onstartups.com. Any other SE site I'm missing? 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. 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 .