Add code highlighting via highlight.js to a page without syntax highlighting by simply clicking this bookmarklet.

Highlighting Code in action

Easy Installation

If you just trust me and want to run JavaScript I wrote (seen below) on your browser, then just drag either or both of these up to your bookmarks bar. I've made one dark (darkula) and one light (solarized light) color scheme highlighters.

Highlight Code (dark) Highlight Code (light)

Custom Installation

Copy the code below and build your own bookmarklet here.

You can set the colorScheme variable to any you find here. Don't include the .min.css; so if I want darkula.min.css, I just have var colorScheme = 'darkula'; at the top.

var colorScheme = 'darkula';

var link = document.createElement('link');
link.setAttribute('rel', 'stylesheet');
link.setAttribute('type', 'text/css');
link.setAttribute('href', '//' + colorScheme + '.min.css');

var script = document.createElement('script');
script.setAttribute('type', 'text/javascript');
script.setAttribute('src', '//');
script.addEventListener('load', function() {
    var pres = document.querySelectorAll('pre');
    for (var i = 0; i < pres.length; ++i) {
        if (!pres[i].querySelector('code')) {
        } else {