GreaseMandrill

By Thomas Rosenau Last update Apr 29, 2011 — Installed 1,134 times.


Script Summary: CSS/JavaScript Syntax Highlighter


GreaseMandrill reloaded


This little helper highlights CSS and JavaScript files.

Usage instructions:

  • Install the script
  • Open a css file or a js file in your browser (I recommend using List Scrips and Stylesheets)
  • The code will automatically be highlighted
  • Press 'w' to toggle word-wrap
  • Press 'g' to toggle highlighting
  • (CSS) Hover over an image URL to show a thumbnail and size information
  • (CSS) Hover over a stylesheet URL (@import) to show a preview of the file
  • (CSS) Hover over a color value to show a sample of that color
  • Click the tab in the upper right corner to show the configuration menu

Screenshots:

  • CSS file, default color scheme:
    CSS
  • Config Menu (Firefox/Greasemonkey only):
    Menu
  • JS file in Opera, neon color scheme:
    OperaJavaScript in Opera with alternative color scheme
Try it out now:

GreaseMandrill Demo Page


New in Version 8:

  • Fixed issue in Firefox 4
  • Added option to have JS code indented using jsbeautifier

New in Version 7:

  • Finally, the menu is operational :)
  • Line numbering
  • Used innerHTML instead of DOM functions (faster)
  • Slightly improved thumbnailer
  • More color schemes
  • Unobtrusive messages instead of alerts
  • Improved syntax definitions

New in Version 6:

  • Brand new engine. Way faster and more configurable than before.
  • Select from a bunch of color schemes
  • New, highly configurable, thumbnail generator. (separate script)
  • Optionally preload the thumbnails
  • Can now highlight embedded code in HTML pages (<pre class="GreaseMandrill LANG:%language%"> - currently %language% must be one of JS or CSS, but more languages can easily be added)
  • Tons of minor improvements and bugfixes

New in Version 5:

  • word wrap is now toggled by key rather than by mouse
  • CSS: clickable image urls
  • CSS: thumbnails for images and colors
  • Several minor changes and bugfixes
  • (no, there is still no menu)

New in Version 4:

  • Minor performance improvements
  • Established Opera compatibility
  • Word-wrap feature re-implemented
  • JS and CSS files are now detected by content-type
  • Update checker can now handle floating point version numbers
  • Workaround for Ctrl-A problem
  • Several minor changes

New in Version 3:

  • Code rewritten, better performance
  • Automatic update checking -- inspired by, but not stolen from Script Update Checker ;)
  • Now aware of CSS2.1 properties (and some CSS3 stuff, too)
  • Removed word-wrap feature. Will be back in next version. I promise.
  • URL detection in CSS
  • Highlighting of .txt files (yes, really...!)
  • Some minor bugfixes

New in Version 2:

(Version 2 was not published)