IMDb - Boards: Markup

By Chicago_gangster Last update Oct 5, 2009 — Installed 291 times. Daily Installs: 0, 0, 0, 3, 0, 0, 0, 1, 2, 0, 0, 0, 0, 0, 0, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 0, 0, 0
Script Summary:
Adds markup shortcuts above the body text area.

This script has no discussions.

start the discussion

Review Summary
5 stars
2 reviews (2)
4 stars
0 reviews (0)
3 stars
0 reviews (0)
2 stars
0 reviews (0)
1 star
0 reviews (0)

this script has 2 reviews

Thumb Thumb
Clicking the buttons or the drop-down list items will insert markup tags inside the body text area.

If no text was selected, the cursor will be placed between the opening & closing tags (see the screenshot).

If text was selected inside the body text area, the tags will wrap the selection and the cursor will be placed after the closing tag.

If text was selected outside the body text area (in the recipient's post), clicking [Quote] will carry the selection down and wrap it in quote tags, which means you don't have to copy & paste any sentences you're replying to. (At that, if text was selected inside the body text area before selecting the outer text, the inner selection will be overwritten.)

Using the [URL] will automatically remove the useless parts of the URL (for the reasons explained here) and accidentally entered or selected line breaks and leading & trailing spaces. At that you don't necessarily have to paste the URL, then select it and click [URL] – you may paste the URL after clicking the button! Clicking it inserts an empty set of markup tags as usual, but it also activates a "trap" which awaits the pasted URL, then trims it. This method is shorter.

This script also automatically sets focus to the body text area when the page loads. (But it excludes message preview pages in order to prevent auto-scrolling down to the body text area.)

How to change the design to "IMDb" (see the second screenshot) or back:
Firefox: Via the menu (when the script is active): ToolsGreasemonkey
User Script CommandsIMDb Boards: markup bar design
Other browsers: You need to manually edit the script, find this line (it's at the top of the code):
IMDb_design = false;
and replace false with true (or vice versa if you want to change it back).

 Feedback


ChangeLog

5 October 2009
  • The "(markup enabled)" link on New topic and New PM pages will open in a new window (to prevent loss of the composed message), just like on Reply and Edit pages. Details.
19 September 2009
  • Fixed this bug (possibly caused by changes made to the IMDb): the script wasn't disabling the body text area on-load autofocus on PM preview pages.
12 September 2009
  • Using [URL] will remove accidentally entered or selected leading & trailing spaces.
  • Added an alternate design (see the second screenshot), which is IMDb-ish. (If you visit title/name pages / User Comments, you know what I mean.)
10 September 2009
  • Fixed this bug: [Emoticons] didn't work in Opera.
7 September 2009
  • Fixed this bug: if the quote (outer selection) contained a line break, the cursor was being placed to an incorrect position after clicking [Quote].
  • Using [URL] will remove its useless parts (details) and accidentally entered or selected line breaks.
17 June 2009
  • Disabled the body text area on-load autofocus on message preview pages in order to prevent auto-scrolling down to the body text area.
15 June 2009
  • Added design.
3 June 2009
  • Clicking [Quote] will carry outer selection down to body text and wrap it in quote tags.
  • Added body text area on-load autofocus.
9 March 2009
  • Added the [Emoticons] drop-down list, which consists of the most frequently used emoticons. (You can easily modify the list by editing the script – it's at the top of the code.)