Fixed cases of submit pages being detected as linklist.

If the submit URL conained parameters like ?selftext=true
the regex would fail and the page would be classified as a
linklist. The primary side effect was to prevent the
character counter from appearing.

Signed-off-by: Scott McClaugherty <gamefreak4321@gmail.com>
Stripped out the old comment preview module and put in skeletons for the separated version.

Signed-off-by: Scott McClaugherty <gamefreak4321@gmail.com>
Reimplemented minimal working editor buttons.

Editor is only added to submit pages.
Currently only the bold, italic, strikethrough, and superscript buttons are implemented.
Shortcuts are not done yet.

Signed-off-by: Scott McClaugherty <gamefreak4321@gmail.com>
Reimplemented link and line prefix macros.

All default macros except for reddiquette and ones found in the dropdown are reimplemented.

Signed-off-by: Scott McClaugherty <gamefreak4321@gmail.com>
Made the comment tools work on most comment forms.
Pass a parameter containing the clicked button to the callback.
Re-added reddiquette and promote buttons.
Reimplemented comment preview.
Add debouncing to the preview.
Readded the big editor.
Fix the big editor button being duplicated.
Fixed mistargeted previews.
Add back the view source button.
Add data migration for the old commentPreview settings
Fixes for several ways that the previous commit was badly broken
Fix several bugs preventing keycode fields from being used in option tables.

Fix required handlers not being attached to keycode fields add after
the panel is drawn.
Fix a new 'keydown' hander being attached to window after every time a
keycode field is focused.
Fixed fields in new table rows not having properly named id fields.
Focus keycode focus/blur events are now delegated instead of attaching
a new handler every time.
Fix comment toolbar not working on forms added after the page loaded

Replaced the per-button bind with event delegation.
Re-implemented user defined macros with multiple categories.

Added fields to the preferences for the category and and a currently
unused shortcut key field.
Categoy dropdowns other than the default will appear on their own line.
Ensure that the edit bar apears on pages where the the OP is editable

In these cases the there is an invisible comment form before the
regular reply form. The editor was being added to that but not the
reply form. This meant that the edit bar would not get coppied to later
reply forms.
Implemented custom keyboard shortcuts for user defined macros

I had  to work around a bug in jQuery 1.6.4 where the Command Key (OS
X) could get incorrectly marked as pressed.