So about a month ago when the whole Syntax Highlighting requests came up in the new forum thread I figured it wouldn’t be that hard to just make a Chrome extension to do the same thing.
It uses this plugin for highlighting, and for now it assumes every code tag is C (or C++) code because there’s nothing to really tell them apart, but for this forum that should be a fair enough assumption.
Who knows when the new Forum will come, and if it’ll have native syntax highlighting, or if I’ll have to update the extension if it doesn’t. But for now, hopefully it comes in handy for some people.
Firefox here. And I only loaded Chrome for this forum to see the code. Once the Firefox port is done Chrome will become a distant memory. I also run Safari on the iPad.
And for what it’s worth I also run a text only browser which is useful for sites that are wildly out of control with little video boxes and other dancing sausages running around the page (cough Slashdot cough Daily Local News cough).
The add-on hasn’t been reviewed by Mozilla yet so you’ll get a warning when you click the Add to Firefox button, but don’t worry. I’ve been running it for over a day now on both my desktop and phone and haven’t noticed any problems.
It uses a different plugin than Nathan’s (this one to be specific), so I’m not sure how different it is as I never installed chrome to check.
If you find any problems or just don’t like the color coding for some reason, feel free to let me know.
It is also compatible with Firefox for Android.
[/ATTACH]
Screenshot from Cody’s holonomic tutorial
This is all awesome stuff you guys but it would be super cool if someone could fix this up for safari. I’m hopeless at programming but i would love anyone who would take the time to do Mac users this favor.
I believe you can install Chrome or Firefox on OSX. I’m not sure how developing add-ons for safari is, but other apple development tends to be a bit of a pain and expensive.
Too messy, I’m trying to essentially write some PHP that requests the VF HTML and modifies it, then outputs the result.
Problem has everything to do with relative links. Going to my site screws up ALL the relative links. Breaking images, CSS, JS, HREFS, etc.
Replacing them is non-trivial as some of these links need to be rewritten to point back to the “viewing” site, and the HTML of the VF is a mess, some links are absolute, others are relative, etc.
The chrome plugins have the advantage of not having to do this.
So another idea that someone else can chomp on might be to make a page with a fullscreen iframe, then use jQuery to mess with the markup inside the iframe.
IDK. Plugin works for me. Kind of just wish things like the broken Skype logo and the syntax highlighting would just be fixed natively.
The iframe plan doesn’t work… trying to access the HTML of an iframe from another domain results in a SecurityError (it is a pretty major security issue if it didn’t).
The only option that I can think of that could potentially work is a server-side script like Cody started to look into that would act as an intermediary… But then you’d need to do some extra cookie handling for authentication, change every URL, etc.
It also introduces the extra issue of authentication information travelling through a third party server, which isn’t exactly desirable.