hacks.mozilla.org

...Web APIs haven’t provided the functionality to copy text to the clipboard through JavaScript, which is why visiting GitHub with Flash disabled shows an ugly grey box where the...

...and slated to move to release in mid-September, it is becoming available to JavaScript within user-action initiated callbacks...

makandra dev
github.com

...following links in your web application faster. Instead of letting the browser recompile the JavaScript and CSS between each page change, it keeps the current page instance alive and replaces...

...you get the bulk of the speed benefits from pjax (no recompiling of the JavaScript or CSS) without having to tailor the server-side response. It just works...

stackoverflow.com

This works in all relevant browsers: document.activeElement You can use this in your Selenium steps, for example, to assert that...

makandracards.com

Added information about what jQuery considers "visible" Added a solution for Prototype Added a patch for Prototype that replaces the...

tutorialzine.com

...implements the technique in this card with tests and all caveats fixed. Related topic: JavaScript: Working with Query Parameters Javascript: Read params from url...

css-tricks.com

Crazy hack. Might be useful one day. The code required has since been extracted into a library.

...Put the attached file into features/support/ to make Capybara more patient in scenarios tagged @javascript...

github.com

Using the JS fullscreen API is painful because all browers use different methods and events and you need to use...

This is non-trivial because you need to fake event objects and require different code for different browsers. Luckily, there...

makandra dev
robertwhurst.github.com

KeyboardJS is a library for binding to keys or key combos

makandra dev
mailru.github.io

A set of javascript tools for working with files. It offers different kinds of things: A cross-browser JS API to work with File objects. Image helper methods, like rotating...

If you want to do JavaScript-style camelization, ActiveSupport's String#camelize method can actually help you out. Simply pass a :lower argument to it. >> 'foo_bar_baz'.camelize

To find an input with the type hidden, you need to specify the type hidden: find_field('Some label', type...

makandra dev
draggabilly.desandro.com

Javascript library for drag'n'drop that seems to have more options than native HTML5 drag'n'drop. They also claim to support "multi-touch", which would be awesome if...

...on touch devices. Another library with similar aims is interact.js (Github). They're pitching JavaScript drag and drop, resizing and multi-touch gestures with inertia and snapping for modern browsers...

...replace the tracking code with a debug version that prints debugging info to the JavaScript console...

The attached ImageLoader helper will start fetching an image and return an image that is resolved once the image is...

lesscss.org

Less.js is a JavaScript implementation of LESS that’s run by your web browser. As any JavaScript, you include a link to the script in your HTML, and…that’s...

...soft hyphens, which makes testing uncomfortable. Automatic insertion of soft hyphens You can use JavaScript libraries like hypher (includes LGPL patterns!) to automatically insert soft hyphens into the text of...

Loading the correct hyphenization patterns for the language you're using JavaScript to apply the library function to the DOM nodes you want hyphenated Manually adding exceptions...

chartjs.org

Chart.js seems to be a good alternative to Google's Chart API and other commercial chart drawing libraries.

thecssninja.com

The attached article explains how to preload images with only CSS. No Javascript required. The gist is: .element:after { content: url(img01.jpg) url(img02.jpg) url(img03.jpg); display: none...

...work between server and browser somewhere. Where you draw that line decides how much JavaScript you write, how the app feels to use, and how hard it is to keep...

...page apps, explains where we usually land and why — and prepares you for the JavaScript cards that follow. Important Work on this lesson in teacher mode. Learning goals

robots.thoughtbot.com

Selenium has been the siren song that continually calls out to us. Unfortunately, in practice we’ve been unable to...

code.google.com

jsPDF is an open-source library for generating PDF documents using nothing but Javascript. You can use it in a Firefox extension, in Server Side Javascript and with Data URIs...