Home Link

Hello, my name is Brett Terpstra, and it’s nice to meet you. Elegant solutions to complex problems. Curious?

Posts Tagged ‘bookmarklet’

  • Jan
  • Feb
  • Mar
  • Apr
  • May
  • Jun
  • Jul
  • Aug
  • Sep
  • Oct
  • Nov
  • Dec

Feb 26
2010

I’ve pushed out an update to Clip­pable, for bet­ter or worse. In addi­tion to the pre­vi­ously added line num­ber removal for code blocks, it removes spans used in Text­Mate for­mat­ted code and adds some key­board shortcuts:

  • Left arrow: switch to light on dark
  • Right arrow: switch to black on white
  • Delete key: return to nor­mal formatting
  • Escape key: return to orig­i­nal page

These fea­tures are added with­out mod­i­fy­ing the orig­i­nal book­marklet, so if you’ve got it installed, you’ve got the good­ies already. Oth­er­wise, head over to the Clip­pable book­marklet page and try it out.

The big news, though, is the intro­duc­tion of Clip­pable Mobile. It’s a work in progress, but installs on an iPhone and makes use of the spe­cial for­mat­ting options avail­able in Mobile Safari. It shrinks images, cuts off code blocks, etc., mak­ing every attempt to pro­vide a read­able page that doesn’t scroll hor­i­zon­tally. There are occa­sions where it fails on first attempt, but run­ning it again right away fixes every­thing. I’m still work­ing on fig­ur­ing out why that hap­pens… a lit­tle sleep will prob­a­bly help. Head over to the Clip­pable Mobile page on your iPhone and fol­low the instruc­tions to install it. Bug reports are welcome!

Dec 31
2009

I made a cou­ple of minor changes to the Clip­pable book­marklet, mostly in the way it han­dles Syn­tax­High­lighter code blocks. The Syn­tax­High­lighter plu­gin is used (too) often to for­mat and color code source snip­pets in web­sites. The result when clip­ping a page is that the code you get still has line num­bers, but no option to view the raw source with­out going back to the web page. Then you end up man­u­ally edit­ing out the line num­bers if you want to copy and paste the code, which can be a pain in most cases.

Since the point of Clip­pable was to deal bet­ter with things like code blocks (espe­cially for sav­ing snip­pets to Ever­note), it now removes the tool­bar and line num­bers from Syn­tax­High­lighter blocks. It also looks for another com­mon tech­nique: con­vert­ing lines in code to an ordered list inside of a pre block. This is just blot­ted out with CSS now. Those are the only two high­light­ing meth­ods it tar­gets at the moment, but I’ll tackle more as I run into them.

If you already have the book­marklet installed, you’re already ben­e­fit­ting from these changes (the book­marklet calls the source scripts on my server, so it is, in essence, auto­mat­i­cally updated). If not, just cruise over to the Clip­pable page and grab it!

Nov 03
2009

Clip­pable to Ever­note will allow you to trig­ger the Clip­pable book­marklet in Safari and copy the result directly to your “Unfiled” note­book in Ever­note. This ser­vice is Snow Leopard-only. If you need it mod­i­fied for Leop­ard and aren’t sure how, let me know. If there’s some inter­est, I’ll just work one up and post it.

To install in Snow Leop­ard, just unzip (double-click the zip file) the file and move the result­ing .work­flow file to [your home directory]/Library/Services. It should now appear in your Safari->Services menu, in Safari only. To add a key­board short­cut to the Ser­vice, go to the Key­board pane in Sys­tem Pref­er­ences, choose the Key­board Short­cuts tab, select Ser­vices on the left and find the Clip­pable… ser­vice on the right. Dou­ble click on the right side of the list­ing to enter a hotkey. I cur­rently have mine bound to control-command-E, which works well for me in Safari.

Down­load here.

Entries (RSS) and Comments (RSS).

Switch to Mobile version