02 February 2011 | |
![]() |
|
w°°t
portfolio
eRiC Werner
pyroTechnical Artist
Berlin,
Germany
|
mel syntax highlight greasemonkey for cgtalk
Hello scripters!
As the oh so magic Jelsoft Enterprises Ltd. won't do anything about the crappy code-highlighting in the vBulletin here. I thought we could help ourselfes: We can fix the whole web so we can do it with the code-boxes here too! I wrote a lot of mel-parsing stuff already but I'm pretty new to JavaScript. So I'm kind of stuck now. But before I end the day I thought I share what I have so far. Maybe I can trigger some more minds and we come up with a all satisfying solution. For those who don't know: Greasemonkey is a Firefox extension. But these Java Script Userscripts run in other browsers too. Ok. As I open up Firebug and look at the page here I see all code-boxes come in <pre> tags with the class='alt2'. Actually I've seen no <pre> without class='alt2' and this actually doesn't seem very solid. But nobody would expect anything to change on this board software anyway. Now from each element we get the textContent and split via \n to get each line:
So here is what I actually want:
what do you think? __________________
goodsoul.de Last edited by ewerybody : 02 February 2011 at 11:47 PM. |
02 February 2011 | |
![]() |
|
Expert
|
Thread automatically closed
This thread has been automatically closed as it remained inactive for 12 months. If you wish to continue the discussion, please create a new thread in the appropriate forum.
__________________
CGTalk Policy/Legalities Note that as CGTalk Members, you agree to the terms and conditions of using this website. |
Thread Closed share thread |
«
Previous Thread
|
Next Thread
»
|
|
|