The Firefox Command Line.
I'm old friends with the command line. Sometimes it's a hassle to remember exactly what to type, but sometimes a command line really is the right tool for the job at hand. And it turns out that another one of my old friends - Firefox - has a command line interface. Open it up at any time with Shift F2. So here are a few nifty features of Firefox's command line that I'd like to remember for next time:
- screenshot sidebar.png --selector body#sidebar: Save a screenshot of the element selected by
body#sidebar. Since the selector must return a single element only, I often use the
nth-of-typeselector as a filter; example:
screenshot thing.png --selector h2:nth-of-type(2). Having Firefox quickly create image files is pretty useful when I'm working on a talk.
- cookie list: Pop-open a list of all the cookies used by the current page. From there you can edit or delete those cookies.
- pagemod replace Firefox donut: Replace all text instances of "Firefox" with "donuts". Or "cloud" with "butts", if that's your more your style.
Be aware that one of the first (and highest-ranked) announcements of Firefox's command line at https://hacks.mozilla.org/2012/08/new-firefox-command-line-helps-you-develop-faster/ is pretty out-of-date. Refer to https://developer.mozilla.org/en-US/docs/Tools/GCLI instead.