Posts Tagged “javascript”

  • Bookmarklet: Clean highlighted code for copying

    I made a little bookmarklet this morning for cleaning up highlighted code blocks in web pages for copying into my notes. You just click it on any web page and all pre>code` blocks and `table.highlight elements will be turned into plain text.…

  • Similarity bookmarklet update

    I've updated the Similarity bookmarklet that I posted yesterday. If you missed it, it's a bookmarklet for desktop browsers that lets you quickly gather links in "Top X resources for..." type posts. It works on Product Hunt collections, "related posts" boxes, etc. By determining common characteristics of links, it does a pretty good job of only selecting links of the same type as you clicked.…

  • Grab sibling links with the Similarity bookmarklet

    How many times have you visited a post with a list of resources, e.g. "15 resources for free stock photos," and wished you could just grab them all at once? I don't know about you, but it happens to me frequently.…

  • TextExpander 5 JavaScript snippets

    I mentioned the release of TextExpander 5 last week, and the fact that it now allows snippets to be written using JavaScript.…

  • Liquid error: incompatible character encodings: UTF-8 and ASCII-8BIT
  • Drafts 4 Keyboard Extensions

    Drafts 4 is out as a Universal app. I'll leave it to the experts to offer the full review, and just mention that there's a very cool new feature in it: JavaScript-based text modification actions.…

  • TL;DR, a jQuery plugin for bloggers

    I made a jQuery plugin called "TL DR" live on GitHub last night. It's designed for bloggers who write long posts: it adds a block with summaries and skip links automatically. It was inspired in part by QuikScan, which was pointed out to me by Christopher Allen.…

  • Marker: Web selections to Markdown

    This is a variant of my Bullseye bookmarklet which takes a selection -- including headlines, links, and images -- and converts it to Markdown using Marky.…

  • Clickable wiki links in the nvALT preview

    I worked this very short script up last night to help a friend scratch an itch. It allows the HTML preview window in nvALT to show [[wiki links]] as clickable text that will jump to linked notes in the editor.…

  • Bullseye 0.3

    First, pressing escape after running the bookmarklet will now cancel it and you can resume browsing without refreshing the page.…

  • Precise web clipping to Markdown with Bullseye

    GrabLinks went over pretty well, so I've been motivated to finish up a similar project I had going. It's called Bullseye, and it lets you click a section of a webpage and "Markdownify" just that content. It's like Readability, but you get to just tell it which part is the good stuff.…

  • Fun with intelligent 404 pages

    Up until today, I'd been redirecting 404 errors on my new site to an archive version of the old site. I'm confident enough at this point that all of my previous content (that I'm concerned with) is properly redirecting and search engines are all updated with the new permalink structure. So I turned that off.…

  • Customizing the nvALT preview

    I got bored with my nvALT preview style. I've been using a GitHub style forever now, and it's great for just about every situation. Clean, crisp, legible... still, I needed a break. I based a new custom style on work that my friend, Erik Sagen, did for the next version of Marked. I made some tweaks for my own tastes, and added some JavaScript tricks to it.…

  • Web Excursions for March 25, 2013
  • Emmet for Cheaters

    Ok, first, if you ever work with HTML or CSS and you haven't seen Emmet yet, take a minute and check it out. I'll wait.…

  • In-place CSS cursor changes

    As part of a feature I'm working on for Marked, I wanted to have the mouse cursor change while the Command key is held down. Using JavaScript to set the CSS for the cursor turned out to be no good as it wouldn't update until the mouse was moved. In this case that wasn't very helpful.…

  • searchFocus, the most useful bookmarklet I've ever made at 3:21am

    Ok, so this is the only bookmarklet I recall making that early in the morning, but it's still useful if you have a browser setup at all similar to mine. When triggered, this bookmarklet finds all input elements on the page, sorts out the text/search types, runs them through a few regular expressions to find the first one that seems a likely candidate to be the main search field and then focuses it. It's not perfect, but it works pretty well across the board (and without loading any libraries or…

  • Video Evidence: Lion search bar in CSS/JS

    I did a little hacking on Marked today and thought I'd share the results. I haven't been able to get an official incremental find working in Webkit it only wants to work on editable text and forcing the find API yields very unsatisfactory results (as you can see in the current version of Marked by hitting F, searching and then using G to jump to the first result). Out of frustration, I decided to build the damn thing in CSS and JavaScript. It worked.…

  • Word repetition checking with JavaScript

    Ok, I made something interesting (to me) last night. It's probably not worth taking the time to write up, but someday someone might find it and think it useful. I apologize for the messiness of the code, if I take this further and clean it up, I'll update this post.…

  • Catching Markdown mistakes

    I had an interesting idea this morning. At least I* find it interesting, but I haven't slept much lately. Either way, here it is: in Markdown, if you misname a reference link, forget to fill one in or have a malformed URL, your broken Markdown shows up in your output. Wouldn't it be nice if your preview highlighted those for you *before you went to publish?…

  • Pully: jQuery plugin for automatic pull quotes

    Another quick experiment. Honestly, I don't use pluggable functions in jQuery nearly as much as I should, so this is really just a brain exercise to get myself used to it. This one, called Pully, lets you specify a selector to have its contents cloned and inserted as a pull quote in your text.…

  • PromptDown for iOS: Mobile Markdown Teleprompter

    I recently wrote a tiny web app called PromptDown to let me drop in some Markdown (or plain text) and use it as a teleprompter for screencast voiceovers. I wasn't going to put any more time into it, as it did what I needed. Then it started to bug me that it didn't work on my iPad, which could actually be really handy. So my lunch break fine, and an extra half an hour went to making it work a little more smoothly as an iPhone/iPad app. It's also ready to install as a web app, so you can go full-…

  • Look, I made you a Markdown teleprompter

    Here's my stupid trick of the day: a Markdown teleprompter called PromptDown (I see what you did there...). The idea was to create a teleprompter for recording screencast voiceovers that was cheap, fast and worked on plain text. I wanted to provide a non-WYSIWYG form field for typing or pasting which still preserved paragraph breaks, so Markdown (via Showdown) was an ideal solution. I also included the jQuery "tabby" plugin so you could use tabs in the textarea without jumping out of it, which…

  • HomeControl: Local Mac control for iPhone

    I tried out a tip recently for controlling a Mac via Mobile Safari on your iPhone, and it got me thinking, which is often dangerous. I put together this little web app today as a proof of concept (that got a little out of hand). It basically provides a full interface for volume control, application starting and stopping and many iTunes functions, including volume and EQ. All features provide interface feedback and update you with current info from your Mac.…

  • Antique 1.6, final release

    For a quick "how-to" on using the Antique (or any) Safari Reader hack, see the related article in the HowTo section.…

  • Ampersands & Javascript

    While playing around with Antique, I decided I really wasn't in love with the ampersands that were included in any of the fonts I was working with. Normally, I'd just run everything through Typogrify and get some handy CSS classes to work with. Working in Safari's Reader, though, I only had access to Javascript (and jQuery, now).…

  • Clippable updated to remove source code line numbers

    I made a couple of minor changes to the Clippable bookmarklet, mostly in the way it handles SyntaxHighlighter code blocks. The SyntaxHighlighter plugin is used (too) often to format and color code source snippets in websites. The result when clipping a page is that the code you get still has line numbers, but no option to view the raw source without going back to the web page. Then you end up manually editing out the line numbers if you want to copy and paste the code, which can be a pain in…

  • Readability2 leaks out

    So my modification of the Readability bookmarklet kind of snuck out before it was ready, but it's my own fault. Now I'm scrambling a little to make it more presentable and less of a straight-up hack of the excellent original. I wanted to make a few things clear about my goals and purpose on this one.…