A Chrome/Firefox extension to allow writing of CoffeeScript within the Web Inspector and run it within the context of the current window, just like the built-in console.
Enable Developer mode
via the toggle in the upper-right corner at
chrome://extensions/
, and load the unpacked extension from the src
directory from disk.
Enable Temporary Add-ons
at about:debugging#/runtime/this-firefox
, and
load the src/manifest.json
file from disk.
- Write CoffeeScript in ACE editor:
- Vim keybindings (in Chrome)
- Syntax highlighting
- Follows the devtools theme for dark mode
- Command+Enter or Shift+Enter to run the current script
- Included libraries for convenience:
$
for jQuery_
for lodashmoment
for moment, including moment-timezoneSugar
for Sugar.jsmdtable()
function adapted from markdown-table with a few small additions
- Helper functions from custom-helpers.js:
$.flattext()
added to jQuery to flatten whitespacebranch()
andnodes()
to help crawl around the DOMcommify()
to place commas as thousands separators
This uses jQuery to parse out pairs of <tr>
elements into an array of
objects, which is then chained through lodash before being fed to mdtable()
.
Sorting is done by date, which requires parsing humanized date strings with
sugar.js (ie, parsing "2 hours ago" to a sortable time value).
Based on CoffeeScript Console 3, CoffeeConsole 2, and CoffeeConsole