Shop OBEX P1 Docs P2 Docs Learn Events
Forums SPINtax Highlighter (Chrome AND Firefox supported!) — Parallax Forums

Forums SPINtax Highlighter (Chrome AND Firefox supported!)

ProcessingData...ProcessingData... Posts: 208
edited 2013-12-28 13:28 in Propeller 1
Get your beautiful forums code here!
A big "Thank you!" for Microcontrolled is in order, as without his PHP syntax highlighter, I probably wouldn't have tried doing this.

SPINtax will highlight SPIN and (some)PASM code in the forums for easier viewing and debugging. No more copying the code into Propeller Tool to see it better!

Notice: If you just click the download links, SPINtax probably won't install correctly. Follow the directions below.

SPINtax is currently available for:
(8/20/2013) Chrome - v0.9
(10/17/2011) Firefox (w/Greasemonkey) - v0.8


Instructions for Chrome:
1 - Right click on the download link for Chrome, and select "Save Link As..."
2 - Open the Extensions page in Chrome
3 - Drag the file from where you saved it onto the extensions page
4 - Chrome will help you install SPINtax from there! Have fun!

Instructions for Firefox:
1 - Install Greasemonkey
2 - Click on the download link for Firefox
3 - Greasemonkey will walk you through the installation of SPINtax. Have fun!

Please let me know in the comments if you find bugs, or want a new feature.

Enjoy your beautiful new code!
~ Taylor

If you would like to donate to keep this project improving, you can click here. Any amount is appreciated.
Thank you to

Jesse (avsa242)

for donating!
993 x 613 - 44K

Comments

  • JonnyMacJonnyMac Posts: 9,107
    edited 2011-09-14 10:08
    That's really neat. Nicely done!
  • bsnutbsnut Posts: 521
    edited 2011-09-14 10:57
    That's a great idea and why I think of it. Late as normal.
  • zappmanzappman Posts: 418
    edited 2011-09-15 04:13
    Thank you, works great.
  • TorTor Posts: 2,010
    edited 2011-09-15 09:10
    Excellent. It does seem to pause the browser for some seconds there, sometimes at least. It seems to happen when I load a new page which contains code.

    But it looks great.

    -Tor
  • RonPRonP Posts: 384
    edited 2011-09-15 10:40
    Very nice, is it supposed to scroll? If so it doesn't seem to work on this particular code block.

    -Ron
  • ProcessingData...ProcessingData... Posts: 208
    edited 2011-09-15 13:33
    Actually, it's not supposed to, RonP, it's supposed to dump the entire contents of the <div>, but it looks like the highlighter script got hung up for some reason, right after that line of commented equals signs. (That's the type of "Bugs" I mentioned in the first post. That's also why I included the "Not Spin" button. ;) )
  • Zap-oZap-o Posts: 452
    edited 2011-09-15 14:24
    This is a sweet tool, hell once the bugs are out I would love to use this while browsing the forums. Perhaps Parallax could place it on the forum index page for people to use.
  • RinksCustomsRinksCustoms Posts: 531
    edited 2011-09-15 17:19
    RonP wrote: »
    Very nice, is it supposed to scroll? If so it doesn't seem to work on this particular code block.

    -Ron

    wont work on my code block which is bigger than just a snip.. scrolling will vastly improve this great add-on! excellent work so far.
  • ProcessingData...ProcessingData... Posts: 208
    edited 2011-09-16 14:08
    Thanks for all the support, guys!

    I decided to take the server-side processing out of the equation, and write a syntax parser in Javascript.

    As you can see in the screenshot below, it's coming along very well!

    The next version of SPINtax will be auto-updating, and completely independent of my server being online.


    screenshot2.jpg
    1024 x 819 - 62K
  • ProcessingData...ProcessingData... Posts: 208
    edited 2011-09-18 13:05
    Version 0.5 of SPINtax has been released.
    (See the top post)
  • RonPRonP Posts: 384
    edited 2011-09-18 13:13
    @ProcessingData

    Works great even scrolls there seems to be very little if any delay now. Great work.

    -Ron
  • ProcessingData...ProcessingData... Posts: 208
    edited 2011-10-17 15:35
    Thanks, Ron!

    Version 0.8 has been released. I'm still not sure if the autoupdate code is working, so it's probably safer to just download the new version.

    ~ Taylor
  • WBA ConsultingWBA Consulting Posts: 2,934
    edited 2011-10-17 16:54
    Just gave it a whirl. Works nicely! It's a little trippy at first seeing the code blocks properly syntaxed in the forums, but after 3 threads, it's a must have! Hope you are able to set it up to Firefox soon as that is my primary browser.

    Great job!
  • ProcessingData...ProcessingData... Posts: 208
    edited 2011-10-17 19:01
    Thanks, Andrew!

    SPINtax for Firefox is available now!

    (See top post)
  • WBA ConsultingWBA Consulting Posts: 2,934
    edited 2011-10-17 22:51
    Awesome! Just tried it out in Firefox 7 and it works perfectly. So much easier to read code inline on the forums now. I used this thread here s an example and it looks really good.
  • ProcessingData...ProcessingData... Posts: 208
    edited 2011-10-18 09:36
    Sweet!
    I'm glad it's working for you!

    If some people want to use it in Safari or IE, they can try the Firefox extension in Greasekit, and Trixie respectively, although I can't say whether I will officially support those Ports of Greasemonkey.
  • avsa242avsa242 Posts: 452
    edited 2013-08-11 04:36
    Taylor,

    This is really a fantastic extension. I've been using it for awhile now and have taken it for granted (I'll be on another computer or my tablet and be wondering why the SPIN isn't getting highlighted...then go "oh yeah...derrrrrrr"). It's been awhile, so I'm not sure if you're still maintaining this, but in case you are, I've been noticing some code snippets lately where it doesn't catch something and HTML starts "leaking" through. Here's an example: http://forums.parallax.com/showthread.php/149534-Propeller-Serial-with-Tight-Byte-Spacing?p=1200254&viewfull=1#post1200254. It's a PASM snippet with single-line comments.
    I'm using spintax ver 0.8, x86_64 Linux Chrome 28.0.1500.89 beta.

    Cheers,
    Jesse

    btw, do you take donations?
  • ProcessingData...ProcessingData... Posts: 208
    edited 2013-08-19 08:07
    Jesse,

    Wow! Thanks for the blast from the past; I had no idea that anyone was still using this. I'm glad you've found it useful, although I haven't done any work on it at all since back in 2011. I haven't taken the time to update it for a number of reasons, one of which was that about the time of the last update, Google changed how Chrome handles third-party extensions. I'm actually not terribly surprised at the bug you've found, as PASM is still something I have to wrap my head around, and I was much more comfortable implementing the highlighting for SPIN.

    Yes, I will take donations if people are gracious enough to give them, you can do that here.

    I might just revisit this project, get it up on the Chrome webstore, and fix the bug you've found and some other things about it that are bothering me now that I'm looking at it again. I've been working with another project recently that involves SPIN and PASM syntax highlighting; I might be able to use some of the elements from CyanIDE, my online IDE for the propeller.

    In case anyone wants to install the current version for Chrome, you can download the .crx by right clicking the link, selecting "Save Link As...", and dragging the downloaded file into the extensions page.

    Thanks again,
    ~ Taylor
  • ProcessingData...ProcessingData... Posts: 208
    edited 2013-08-20 11:45
    Thank you for donating, Jesse!
    I just made an update to the code, fixing the issue you noticed with the PASM.
    I also updated how it looks to better fit the forums' default color scheme.
  • avsa242avsa242 Posts: 452
    edited 2013-08-21 13:40
    Taylor,

    Awesome, it works! Thanks! And you're welcome...like I said, I definitely take it for granted...it's a really nice thing to have.

    Cheers,
    Jesse
  • dgatelydgately Posts: 1,630
    edited 2013-12-28 13:28
    Taylor,

    Are these files still hosted somewhere? Not able to use the links in the first post, as I get '404' (not found) errors...

    Thanks,
    dgately
Sign In or Register to comment.