JavaScript Interpreter-in-a-Bookmarklet

» JS Mini-Shell «

Go ahead, click it. You know you want to.

Installation

Drag this to your bookmarks toolbar:

JS Mini-Shell

Why?

Because the best tool is the one you have with you.

And because sometimes just turning on Developer Tools changes the behavior of the page.

(I'm looking at you, Internet Explorer Developer Toolbar.)

Source

Bookmarklet Code

Original JavaScript

function() {
  var result = "Enter some JavaScript and hit go";
  var code = prompt(result, '');
  while (code !== null) {
    try {
      result = eval(code);
    } catch (ex) {
      result = ex.message;
    }
    code = prompt(result, code);
  }
}