background preloader

FlowType.js

Offline.js What is Offline.js? Offline.js is a library to automatically alert your users when they've lost internet connectivity, like Gmail. It captures AJAX requests which were made while the connection was down, and remakes them when it's back up, so your app reacts perfectly. It has a number of beautiful themes and requires no configuration. Install The easiest way to add Offline to your site is with Eager. Click Install to see a live preview of Offline on your website. Download Offline.js Pick a Theme Indicator Themes Submit a theme! Documentation HubSpot Keypress: A Javascript library for capturing input The first thing to do is include the JavaScript file in your page. Once you've got that loaded in, you'll want to start by instantiating a listener: var listener = new window.keypress.Listener(); Once you've done that you can register combos with that listener you've created. The simplest way to do that is using the simple_combo API. It takes a space dilineated string or an array of strings of key names that describe your combo. listener.simple_combo("shift s", function() { console.log("You pressed shift and s"); }); listener.counting_combo("tab space", function(e, count) { console.log("You've pressed this " + count + " times."); }); listener.sequence_combo("up up down down left right left right b a enter", function() { lives = 30; }, true); If you only want to use Keypress for some very simple keyboard shortcuts, that's all you need to know! listener.unregister_combo("shift s"); listener.unregister_many(my_registered_combos); listener.reset();

Introducing Responsive Web Typography With FlowType.JS Advertisement It’s our great pleasure to support active members of the Web design and development community. Today, we’re proud to present FlowType.JS that allows a perfect character count per line at any screen width. This article is yet another special of our series of various tools, libraries and techniques that we’ve published here on Smashing Magazine: LiveStyle, PrefixFree, Foundation, Sisyphus.js, GuideGuide, Gridpak, JS Bin, CSSComb and Jelly Navigation Menu. — Ed. While working on an image-heavy site for Simple Focus, a couple of our designers, John Wilson and Casey Zumwalt, noticed how images always scaled perfectly. “Wouldn’t it be nice,” John asked, “if text worked more like images?” “In a fluid layout, browser width and typographic measure are linked: the wider the viewport, the more characters per line.” – Trent Walton Simple Focus is mainly a design firm, so like most programming ideas we have, we didn’t do anything with it. Here’s the process of how we got there: (il, ea)

UIkit Codeblock.js by Filepicker.io Why? Humans learn better when they can play with what they're working with, when they can poke at it and understand what happens to B when you change A. The browser provides a wonderful place where examples can be interactive, and yet most documentation for javascript APIs doesn't make use of these capabilities. Codeblock.js turns example code into editable, runnable code blocks that visitors can poke at and play with to better understand your API. For example, try playing with the parameters in the example below: Output from the example appears here run Using Codeblock.js Codeblock.js is a jQuery plugin that uses the Ace code editor, and therefore requires including both jQuery and Ace. Once the scripts are imported, you can use the $.codeblock call to transform any piece of text into an editable, runnable code sample. The codeblock.js api is very similar to the api of jQuery UI widgets, so if you are familiar with those the syntax should feel natural. Instantiation Methods Events

Lena.JS pixel to pixel: grayscale sepia thresholding-128 invert saturation red green blue edge/line detection: roberts sharpen sobel y sobel x highpass laplacian gaussian prewitt y prewitt x Drag and drop filters hereremove all filters Moment.js iScroll 4 Project info Last code update: 2012.07.14 – v4.2Device compatibility: iPhone/Ipod touch >=3.1.1, iPad >=3.2, Android >=1.6, Desktop Webkit, Firefox, Opera desktop/mobile.Discussion groupQR Code opens demo page. Support development If this script saved your day and you wish to support future developments you may consider sending some funds via PayPal or Flattr. Overview iScroll 4 is a complete rewrite of the original iScroll code. While latest Android revisions are supporting this functionality (although support is not optimal), Apple seems reluctant to add one finger scrolling to divs. In addition to all previous iScroll features, version 4 introduces: Pinch / ZoomPull up/down to refreshImproved speed and momentumSnap to elementCustomizable scrollbars Please note that iScroll 4 is not a drop-in replacement for iScroll 3. Also consider that the script is still in beta, and some APIs may slightly change. Getting started In the archive you’ll find plenty of examples to get you started. onLoad

Parallel.js Parallel Computing with Javascript Parallel.js is a tiny library for multi-core processing in Javascript. It was created to take full advantage of the ever-maturing web-workers API. Parallel.js solves that problem by giving you high level access to multicore processing using web workers. Unminified: parallel.js Minified (1490 Bytes gzipped): parallel.min.js Source: github Include parallel.js in your web projects like so: This will give you access to the global variable, Parallel. Parallel can also be included in node: $ npm install paralleljs var Parallel = require('paralleljs'); Parallel(data, opts) This is the constructor. The object returned by the Parallel constructor is meant to be chained, so you can produce a chain of operations on the provided data. Arguments data This is the data you wish to operate on. options (optional): Some options for your job evalPath (optional): This is the path to the file eval.js. Examples Let's construct an new Parallel.js job: spawn fn map A function to apply. reduce

Numeral.js Datejs Last updated 2008-04-14 Datejs is an open source JavaScript Date library for parsing, formatting and processing. The last 'official' release was Alpha-1 on November 19th, 2007. Technical support is provided through the Datejs Discussion Group. A test suite is available within SVN (/trunk/test/) or viewable online at View Change Log. NOTE Please be sure to check out our blog post "Getting Started with Datejs". We recommend including one of the .js files from within the /build/ folder. Within the /build/ folder, a date.js file has been created for each of the 150+ supported Cultures. Before minification, the Datejs library is contained in five (6) separate JavaScript files. The following is a list of precedence if including the files individually. 1. * The parser.js file is not required for sugarpak.js ** The time.js and extras.js files are optional and are not included in the compiled /build/ versions. Syntax Overview Date.today().add(1).day() // Add one (+1) day.

PhantomJS crypto-js CryptoJS is a growing collection of standard and secure cryptographic algorithms implemented in JavaScript using best practices and patterns. They are fast, and they have a consistent and simple interface. If you have a problem with CryptoJS, if you want to discuss new features, or if you want to contribute to the project, you can visit the CryptoJS discussion group. CryptoJS is a project that I enjoy and work on in my spare time, but unfortunately my 9-to-5 hasn't left me with as much free time as it used to. SHA-3! See the full ChangeLog. Hashers The Hasher Algorithms MD5 is a widely used hash function. <script src=" var hash = CryptoJS.MD5("Message");</script> The SHA hash functions were designed by the National Security Agency (NSA). SHA-256 is one of the four variants in the SHA-2 set. The Hasher Input The Hasher Output alert(typeof hash); // object Ciphers

Related: