Category Archives: javascript

node.js redirect with query string

Previously, I discussed javascript appending to query string, where we serialized an associative array to a query string. I would now like to leverage this technique within node.js as a redirect service. Specifically, I am using express to make a … Continue reading

Posted in javascript | Comments Off on node.js redirect with query string

javascript appending to query string

I would like to append an associative array to a URL's query string. For whatever reason, there is no native javascript method to accomplish this task. This needs to be done manually or using a common web framework such as … Continue reading

Posted in javascript | Comments Off on javascript appending to query string

scripting Photoshop for stop motion

I would like a simple and quick way to save a copy of an image in Photoshop, with an auto-incrementing filename. Ideally, a single button to capture a frame in a stop motion animation. In other words, I would like … Continue reading

Posted in html, javascript, shell tips | Comments Off on scripting Photoshop for stop motion

HTML5 canvas Mandelbrot

I would like to create an animated Mandelbrot visualization using JavaScript on an HTML5 <canvas> element. The Mandelbrot set, popularized by BenoĆ®t Mandelbrot, is the set of complex numbers that remain bounded under the function zn+1 = zn2 + c. … Continue reading

Posted in html, javascript | Leave a comment

javascript keyboard buffer, part 4

Previously, we created a JavaScript keyboard buffer that can edit text in a static html page as well as play back each key as it was typed. I would like to combine all of this into a single JavaScript include … Continue reading

Posted in css, html, javascript, software arch. | Leave a comment

javascript keyboard buffer, part 3

Previously, we created a javascript keyboard buffer that can edit text in a static html page. Using those functions I'd like to add a buffer replay. I would like to add an onclick event to a specified div such that … Continue reading

Posted in javascript | Leave a comment

javascript keyboard buffer, part 2

Previously, we created a javascript keyboard buffer and next I'd like to process that buffer to edit text in a static html page. Given the following simple html: <div id="keyboardBufferTest"> Spam and eggs </div> I would like the keyboard buffer … Continue reading

Posted in javascript | Leave a comment

javascript keyboard buffer, part 1

I would like to capture keystrokes in JavaScript, save them to a buffer, and play them back exactly as they were typed. There are three onkey events that can be assigned event handlers, these are, document.onkeydown = eventHandler document.onkeypress = … Continue reading

Posted in javascript | Leave a comment

javascript prototype

I would to extend the functionality of a JavaScript class, for example, to add utility functions to a specific Object. Object.prototype The prototype property can be used to add new properties and functions to any object, including built-in objects. For … Continue reading

Posted in javascript | Leave a comment

css opacity in javascript

I want register JavaScript events to toggle CSS opacity on selectable images. For example, given a div with a list of images like the following, <div id="foo_images"> <img src="foo.jpg" /> <img src="bar.jpg" /> <img src="baz.jpg" /> ... </div> I would … Continue reading

Posted in css, html, javascript, software arch. | Leave a comment