Skip to content

Instantly share code, notes, and snippets.

@balbuf
Created May 9, 2016 18:40
Show Gist options
  • Save balbuf/f6929b3fe2592a42b57fbcb1d2c53fcd to your computer and use it in GitHub Desktop.
Save balbuf/f6929b3fe2592a42b57fbcb1d2c53fcd to your computer and use it in GitHub Desktop.
Bookmarklet to indent the current list item in the Basecamp WYSIWYG editor (prepend with `javascript:`)
(function($,s,l,p){(s=$('iframe.wysihtml5-sandbox')[0])&&(s=s.contentWindow.getSelection())&&(l=$(s.focusNode).closest('li'))&&(p=l.prev('li'))&&p.length&&p.append($('<ul>').append(l))})(jQuery);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment