BBCode Emulation in Greasemonkey
|
Strife Onizuka
Moonchild
Join date: 3 Mar 2004
Posts: 5,887
|
06-03-2007 17:41
Well I got sick of not having BBCode, so I wrote a Greasemonkey script to parse BBCode. It isn't as robust as BBCode but it will work 99% of the time. It won't fail on valid BBCode. http://www.greasespot.net/ - Greasemonkey homepage http://home.comcast.net/~mailerdaemon/bbcodeintext.user.js - Direct script download http://userscripts.org/scripts/show/9651 - the script on UserScripts.org News: Added support for untagged urls in text. These tags are supported: url email thread post indent code - the spacing can be strange php - no highlighting performed, just a synonym for code. font size color b u i right left center highlight list img * Works during edit and viewing of threads and posts.
_____________________
Truth is a river that is always splitting up into arms that reunite. Islanded between the arms, the inhabitants argue for a lifetime as to which is the main river. - Cyril Connolly
Without the political will to find common ground, the continual friction of tactic and counter tactic, only creates suspicion and hatred and vengeance, and perpetuates the cycle of violence. - James Nachtwey
|
2k Suisei
Registered User
Join date: 9 Nov 2006
Posts: 2,150
|
06-03-2007 17:48
I don't see a question mark! 
|
Strife Onizuka
Moonchild
Join date: 3 Mar 2004
Posts: 5,887
|
06-03-2007 18:16
Anyone who download prior to this should redownload the script. I've made some changes so it can handle some strange bbcode. From: 2k Suisei I don't see a question mark!   It's in response to all the complaints about a lack of bbcode.
_____________________
Truth is a river that is always splitting up into arms that reunite. Islanded between the arms, the inhabitants argue for a lifetime as to which is the main river. - Cyril Connolly
Without the political will to find common ground, the continual friction of tactic and counter tactic, only creates suspicion and hatred and vengeance, and perpetuates the cycle of violence. - James Nachtwey
|
CarlCorey Colman
Fnord
Join date: 15 Dec 2006
Posts: 177
|
06-03-2007 18:23
Pardon my cluelessness ... How do I use this code to enhance my enjoyment when reading this forum.
|
Strife Onizuka
Moonchild
Join date: 3 Mar 2004
Posts: 5,887
|
06-03-2007 20:34
fixed a stupid bug. How to use this: 1) Install the greasemonkey extension for Firefox: https://addons.mozilla.org/en-US/firefox/addon/7482) Restart you browser 3) browse to: http://home.comcast.net/~mailerdaemon/bbcodeintext.user.js4) click the install button thingy. if you have problems getting greasemonkey to work try the 0.7 release candidate. which you can find on the page i linked above. There is an Internet Explorer port of Greasemonkey.
_____________________
Truth is a river that is always splitting up into arms that reunite. Islanded between the arms, the inhabitants argue for a lifetime as to which is the main river. - Cyril Connolly
Without the political will to find common ground, the continual friction of tactic and counter tactic, only creates suspicion and hatred and vengeance, and perpetuates the cycle of violence. - James Nachtwey
|
Najmah Handayani
(aka Toy LaFollette)
Join date: 26 Nov 2006
Posts: 154
|
06-03-2007 20:43
if you use Firefox, and you should hehehe, use the addon called Linkification and it will do it.
_____________________
"We could learn a lot from crayons: some are sharp, some are pretty, some are dull, some have weird names, and all are different colors ... but they all have to learn to live in the same box." ___________________________________ Textures by Naj
|
Strife Onizuka
Moonchild
Join date: 3 Mar 2004
Posts: 5,887
|
06-03-2007 20:54
Fixed another bug ~_~ and made it work in preview. I really don't want to have set it out to read the page text.
This does something different then linkification (though there is a tiny bit of overlap).
_____________________
Truth is a river that is always splitting up into arms that reunite. Islanded between the arms, the inhabitants argue for a lifetime as to which is the main river. - Cyril Connolly
Without the political will to find common ground, the continual friction of tactic and counter tactic, only creates suspicion and hatred and vengeance, and perpetuates the cycle of violence. - James Nachtwey
|
Najmah Handayani
(aka Toy LaFollette)
Join date: 26 Nov 2006
Posts: 154
|
06-03-2007 20:59
I will check it out, Strife 
_____________________
"We could learn a lot from crayons: some are sharp, some are pretty, some are dull, some have weird names, and all are different colors ... but they all have to learn to live in the same box." ___________________________________ Textures by Naj
|
SuezanneC Baskerville
Forums Rock!
Join date: 22 Dec 2003
Posts: 14,229
|
06-03-2007 21:07
That url for the .js file is not working for me.
_____________________
-
So long to these forums, the vBulletin forums that used to be at forums.secondlife.com. I will miss them.
I can be found on the web by searching for "SuezanneC Baskerville", or go to
http://www.google.com/profiles/suezanne
-
http://lindenlab.tribe.net/ created on 11/19/03.
Members: Ben, Catherine, Colin, Cory, Dan, Doug, Jim, Philip, Phoenix, Richard, Robin, and Ryan
-
|
SuezanneC Baskerville
Forums Rock!
Join date: 22 Dec 2003
Posts: 14,229
|
06-04-2007 06:04
Is anyone able to download the greasemonkey script from http://mailerdaemon.home.comcast.net/bbcodeintext.user.js ?
_____________________
-
So long to these forums, the vBulletin forums that used to be at forums.secondlife.com. I will miss them.
I can be found on the web by searching for "SuezanneC Baskerville", or go to
http://www.google.com/profiles/suezanne
-
http://lindenlab.tribe.net/ created on 11/19/03.
Members: Ben, Catherine, Colin, Cory, Dan, Doug, Jim, Philip, Phoenix, Richard, Robin, and Ryan
-
|
bilbo99 Emu
Garrett's No.1 fan
Join date: 27 Oct 2006
Posts: 3,468
|
06-04-2007 06:15
From: 2k Suisei I don't see a question mark!  'sides ... this is Resident Answers ... not Questions 
_____________________
Be polite .. that newbie could be your next ex-partner.
|
Strife Onizuka
Moonchild
Join date: 3 Mar 2004
Posts: 5,887
|
06-04-2007 08:46
_____________________
Truth is a river that is always splitting up into arms that reunite. Islanded between the arms, the inhabitants argue for a lifetime as to which is the main river. - Cyril Connolly
Without the political will to find common ground, the continual friction of tactic and counter tactic, only creates suspicion and hatred and vengeance, and perpetuates the cycle of violence. - James Nachtwey
|
SuezanneC Baskerville
Forums Rock!
Join date: 22 Dec 2003
Posts: 14,229
|
06-04-2007 16:57
Thanks, Strife, very nice work. The script works in Opera, by the way. Hooray!!!!
_____________________
-
So long to these forums, the vBulletin forums that used to be at forums.secondlife.com. I will miss them.
I can be found on the web by searching for "SuezanneC Baskerville", or go to
http://www.google.com/profiles/suezanne
-
http://lindenlab.tribe.net/ created on 11/19/03.
Members: Ben, Catherine, Colin, Cory, Dan, Doug, Jim, Philip, Phoenix, Richard, Robin, and Ryan
-
|
Zen Zeddmore
3dprinter Enthusiast
Join date: 31 Jul 2006
Posts: 604
|
thank you
06-04-2007 20:29
sweet! i've had GM installed forever and this is the first time i've seen someone use it. i also had linkification, but the GM script is cleaner. thank you. ps are there other great GM scripts out there?
|
Rotary Fan
Registered User
Join date: 23 Jun 2006
Posts: 190
|
06-04-2007 20:36
From: Zen Zeddmore are there other great GM scripts out there? the http://userscripts.org site says it has over 6,000 greasemonkey scripts.
_____________________
Name: Rotary Fan Born: 6/23/06 Resident • No Payment Info On File Boycott Youtube - the video ads suck.
|
Salvador Nakamura
http://www.sl-index.com
Join date: 16 Jan 2007
Posts: 557
|
06-05-2007 00:06
|
SuezanneC Baskerville
Forums Rock!
Join date: 22 Dec 2003
Posts: 14,229
|
06-05-2007 06:16
Very clever. Userscripts.org seems to be the place to go for Greasemonkey scripts. I haven't been to that site for ages. The img tag trick did not work for userscripts.org.
_____________________
-
So long to these forums, the vBulletin forums that used to be at forums.secondlife.com. I will miss them.
I can be found on the web by searching for "SuezanneC Baskerville", or go to
http://www.google.com/profiles/suezanne
-
http://lindenlab.tribe.net/ created on 11/19/03.
Members: Ben, Catherine, Colin, Cory, Dan, Doug, Jim, Philip, Phoenix, Richard, Robin, and Ryan
-
|
Strife Onizuka
Moonchild
Join date: 3 Mar 2004
Posts: 5,887
|
06-17-2007 21:10
I've updated the script so it properly spaces php and code tags (just needed to strip the BR tags from them). You can get the update from: http://userscripts.org/scripts/show/9651http://home.comcast.net/~mailerdaemon/bbcodeintext.user.js
_____________________
Truth is a river that is always splitting up into arms that reunite. Islanded between the arms, the inhabitants argue for a lifetime as to which is the main river. - Cyril Connolly
Without the political will to find common ground, the continual friction of tactic and counter tactic, only creates suspicion and hatred and vengeance, and perpetuates the cycle of violence. - James Nachtwey
|
Dytska Vieria
+/- .00004™
Join date: 13 Dec 2006
Posts: 768
|
06-17-2007 21:22
Strife, This is A Great Big Thank You for You!!!
_____________________
+/- 0.00004
|
Ava Glasgow
Hippie surfer chick
Join date: 27 Jan 2007
Posts: 2,172
|
06-17-2007 21:49
Oooo, that's nice! I am SO tired of cutting and pasting URLs. 
|
Warda Kawabata
Amityville Horror
Join date: 4 Nov 2005
Posts: 1,300
|
06-18-2007 00:28
Can we get this thread stickied, at least until they restore the bbcode functionality?
_____________________
 I rent out land on private islands. Message me in-world for details. 
|
Wildefire Walcott
Heartbreaking
Join date: 8 Nov 2005
Posts: 2,156
|
06-22-2007 15:50
This is pretty durned awesome, Strife!
|
Strife Onizuka
Moonchild
Join date: 3 Mar 2004
Posts: 5,887
|
06-23-2007 08:49
By popular demand, I've added parsing of non-bbcode urls. I haven't fully tested the regex that is doing the pattern matching yet but it does work.
Things I might do: Make Broken Xeno signature parse (bunch of work that I'm not keen on doing).
EDIT: just did another small update
_____________________
Truth is a river that is always splitting up into arms that reunite. Islanded between the arms, the inhabitants argue for a lifetime as to which is the main river. - Cyril Connolly
Without the political will to find common ground, the continual friction of tactic and counter tactic, only creates suspicion and hatred and vengeance, and perpetuates the cycle of violence. - James Nachtwey
|
Tasman Perth
Geekette Extraordinaire
Join date: 7 Jun 2005
Posts: 225
|
06-30-2007 15:12
YAY STRIFE!!! Thank you MUCHLY for this!!!
Tas
|
Valentino Tendaze
Eternal Optimist
Join date: 9 Jan 2007
Posts: 279
|
07-03-2007 03:50
Strife, you're a star  Thanks for this - finally got round to downloading it for the PC and it's great! Now /me wonders if it will work on the Mac at home...
|