MozillaZine

GreaseMonkey Script - BBCode Helper for 'zine Forums

Post a reply

:
In an effort to prevent automatic submissions, we require that you enter both of the words displayed into the text field underneath.
Smilies
:D :) :( :shock: :? 8-) :lol: :x :P :oops: :cry: :evil: :twisted: :roll: :wink: :!: :?: :idea: :arrow: :| :mrgreen: =D> #-o :^o [-X [-o< 8-[ [-( :-k ](*,) :-"
View more smilies
BBCode is ON
[img] is ON
[flash] is OFF
[url] is ON
Smilies are ON
Topic review
   

Expand view Topic review: GreaseMonkey Script - BBCode Helper for 'zine Forums

GreaseMonkey Script - BBCode Helper for 'zine Forums

Post by jqp » July 12th, 2005, 9:00 pm

http://www.websandbox.net/script/bbcodehelper.user.js

This new GreaseMonkey script adds buttons to help you add BBCode to your post. <del>It's also compatible with my QuickEdit script.</del> Actually I don't think it is compatible... how do you tell one GM script to wait until another is finished?

Featres:
-bold
-italics
-underline
-code
-quote (enter name of person you're quoting in a textbox)
-color (enter name/code of color you're using)
-url (you're prompted for the URL)
-img (you're prompted for the URL
-size (choose the size from a dropdown)

For all buttons but img:
-Click the button with text selected and the selected text is placed inside the tag
-Click the button with no text selected and the start tag is placed. Click the button again to place the end tag

For the img button:
-The URL you enter in the prompt is placed inside the tag. If text is highlighted, the img tag is placed at the end of the selection.

I didn't do lists. If someone wants to give it a shot, go ahead.

That's it for me, I'm going to bed. Happy BBCoding.

Post bugs here or PM me.

BTW - the script looks for any textarea with a "name" attribute of "message" or "class" attribute of "post" inside a TD tag - that would EASILY work with other phpBB forums.

Bug - Doesn't ALWAYS work with QuickEdit, but does some of the time... don't know why... I thought the QE script should run first because it uses an anonymous function. The BBCode script using an onload event... Hmm.

Top