I’m a DRY person. I try not to repeat myself, or do tasks over and over manually when they could be automated. So I’ve started to create different bookmarks in my browser that automate different common tasks using JavaScript. I thought I’d share a few of these that can be used to look up WordPress related stuff in various references. Their usage is simple. Once you have bookmarked one of them in your browser, clicking on the bookmark will bring up a JavaScript prompt dialog box where you can enter whatever you are searching for. If you have already highlighted the text to search for on the page, then the prompt will be skipped.
- WP Seek – look up anything WordPress on wpseek.com.
- WP Function Reference – look up a function in the reference on the official WordPress codex.
- WP Action Reference – look up an action hook in the WordPress codex.
- WP Filter Reference – look up a filter hook in the WordPress codex.
It’s not hard to roll these, and you can make some yourself. Here’s an example. Just make a few changes and strip out the white space.
javascript: q = document.getSelection(); if ( q.rangeCount < 1 ) void( q = prompt( 'WP%20Seek:', '' ) ); void( q = escape( q ) ); if ( q && q != 'null' ) location.href = 'http://wpseek.com/' + q