A downloadable userscript

Download NowName your own price

Introduces automatic syntax highlighting for code snippets posted on GameMaker forum.

Shares most of the code with my existing userscript of similar purpose.

Also see syntax highlighting for GameMaker manual.

More information

Published142 days ago
StatusReleased
CategoryTool
Rating
(1)
AuthorYellowAfterlife
Tagsuserscript

Download

Download NowName your own price

Click download now to get access to the following files:

gamemaker_forum.user.js

Comments

Log in with your itch.io account to leave a comment.

little tweak needed for the var declaration to support

var t1 = 0,
t2 = 1,
t3 = 2;


There are a couple of problems like that, URLs inside strings (causes highlight as comments), and few other things.

Ultimately this should probably be rewritten to have an actual parser instead of global regular expressions.

(Edited 2 times)

is there anyway that I could get this to work on a proboards forum? Would really love to add this to my site!

EDIT: I should note that I can create custom plugins for the site, so is there anyway that I could potentially turn this into a proboards-friendly plugin?

Double Edit: It's also worth mentioning that proboards uses CodeMirror

You could edit the class names in the source code to point to code boxes specific to your forum and load it as a JS file in the end of the page.

If there's CodeMirror support, you could create a GML highlighter plugin for it based on JS highlighter or C highlighter. It's not too tricky.

probably not too tricky, but I have no idea how to do that :P

Another buck well spent!

Could it be possible to add the same feature as the online help for this, clicking on a function to go to the online help file

Given that forums are on the same domain, should be possible. I'll take a look later.