Userscripts Comments Fix

By sizzlemctwizzle Last update Nov 14, 2011 — Installed 11,375 times.


Script Summary: Packed full of features that make using Userscripts.org easier!

Version: 2.2.6

What does this script do?

Well basically it just does a whole bunch of stuff to help improve the forums on this site. Currently this script's features include:

  • Selection Quoting - Have you seen those neat quotes in the forums? We'll this adds a link below each users avatar to quote them. You can also select just part of a post by highlighting it and clicking the quote link.
  • Code Escaping - This site will mangle your HTML and scripts. To post code in the forums just wrap them with a pre or code tag.
  • One click post deletion - A delete link will be added under your avatar on your posts.
  • Keyboard Shortcuts - Just select text in the editor and it a shortcut to wrap the selected text in the corresponding tag.
  • Report Spam - Help us destroy those evil spammers by clicking the spam link under the avatar of a spammer.
  • Preview Posts - Sometimes you aren't sure how your post will look, especially when posting code. Use the preview button in the editor to see how your post will look when you submit it.
  • Auto-watch topics you reply to - There is a checkbox in the editor to toggle this feature off and on. If it's on then when you reply to a topic you will automatically watch that topic.
The sections below have further details about using the above features.

Escaping the code and pre blocks

You can now use tags in pre and code blocks by escaping. Here is an example:
Here is some bold text in a pre block
To get that effect you use this code:
<pre>[strong]Here is some bold text[/strong] in a pre block<pre>

Shortcuts

Highlight text and press Alt(Ctrl on Mac) +....
  • c - puts the selected text in a <code> block
  • p - puts the selected text in a <pre> block
  • q - puts the selected text in <blockquote>
  • b - makes selected text bold
  • i - makes selected text italics
  • u - underlines selected text
  • s - strikes through the selected text
  • l - makes selected text a link via a prompt
  • a - makes selected text a link without a prompt
  • x - makes selected text an embed image if it's a url to an image

One-click Quoting

  • Optionally open the reply to topic box
  • Optionally select text in the DOM body with mouse
  • Click Quote under the gravatar
  • Click to focus in the reply to topic box (if text cursor isn't there already)
  • Select text in the reply to topic box
  • Use "Hot keys" or click lettered links to the right to put the html tags around what is selected
(thanks Marti)

Report Spam

When you click a spam report link the spam report manager will appear where you can edit and delete reports. Your reports are saved locally on your computer until you decide to submit them. This mean you can leave the page. You can also open the spam manager at any time on a topic page from the "User Script Commands..." menu. When you are ready to submit all your spam reports hit the button. If somebody has already reported a post as spam a green link will appear next to the report. Delete these and then re-submit your reports.

Credit where credit is due

This script is a frankenstein-like monster. When I first posted the script none of the code was actually mine and then I started adding my own changes and shoving in bits of code from others. The code for escaping in pre and code blocks automatically (which was the original purpose of this script) was originally posted here by Aquilax after I requested a script to do this. The shortcut code is inspired by some of Avg's code. I also included Avg's spam reporting code. Yet again I borrowed one of Avg's great ideas and used his code for one click post deleting. Recent[1] changes[2] have come from[3] Marti. Anything else in the script is likely my code.

Creative Commons License
This work is licensed under a Creative Commons Attribution-Noncommercial-Share Alike 3.0 United States License.