Craig Campbell
craig.is · Personal blog · on HN since 2012
Craig Campbell writes about his small JavaScript libraries, such as Mousetrap and Rainbow.js, and developer tools like Chrome Logger.
What HN saysCommenters recommend Mousetrap for keyboard shortcuts and Rainbow.js as a lighter syntax highlighter; one notes Chrome Logger's headers grew too large.
15HN people shared it
10linked it in comments
7stories submitted
752story points
2 years agolast shared
2012people per year2026
Most-shared posts
- 1Mousetrap: Keyboard shortcuts in Javascript7 people · 395 points · first shared 2012 · 74 comments on HN
- 2Rainbow.js - code syntax highlighting in 1.2kb4 people · 261 points · first shared 2012 · 32 comments on HN
- 3Server side logging to Chrome console from PHP and Python3 people · 65 points · first shared 2013 · 23 comments on HN
- 4Gator.js - simple event delegation in ~800 bytes1 people · 28 points · first shared 2012 · 7 comments on HN
- 5Chrome Logger - Chrome extension for debugging server side apps1 people · 3 points · first shared 2013 · discussion on HN
- 6Techspecs1 people · first shared 2013
- 7Code1 people · first shared 2021
- 8Techspecs1 people · first shared 2013
What HN people wrote when they linked it
0x073 · 2024-11-22
I used chromelogger years ago that created often a too big http header over time https://craig.is/writing/chrome-logger
craigc · 2021-03-25
Shameless self promotion, but my testing library, Luna, supports testing Svelte components out of the box.
https://craig.is/testing/code
Full documentation on Github:
https://github.com/ccampbell/luna-testing
notjustanymike · 2015-04-21
Seems to me you could just use mousetrap.js and get the added bonus of a solid key capture library.
https://craig.is/killing/mice
lukevers · 2015-02-20
I've tried Highlight.js before and I was never really a big fan of it. It seemed too heavy last time I tried it. I've been using rainbow.js for a year or two now.
http://craig.is/making/rainbows/
avel · 2015-01-11
An alternative is mouestrap: http://craig.is/killing/mice
I've used it successfully in Marionette and Angular applications.
It is 29k unminified, vs 35k of keypress.js.
quarterto · 2013-11-25
Looks nice, but not sure why I'd use this over the more general-purpose Mousetrap[1]?
[1]: http://craig.is/killing/mice
deepakg · 2012-09-05
Probably relevant to the discussion, the mousetrap library:
http://craig.is/killing/mice
lukeholder · 2012-07-31
Others people might find useful:
http://craig.is/making/rainbows (1.4kb)
http://softwaremaniacs.org/soft/highlight/en/
I prefer
http://pygments.appspot.com
gprasanth · 2013-09-29
Also this: http://craig.is/killing/mice
Kerrick · 2013-07-12
Reminds me of http://craig.is/killing/mice