recentpopularlog in

handcoding : javascript   632

« earlier  
nathanford/ragadjust: A bit of JavaScript to fix your text rag for prepositions, small words, or emphasis.
“A bit of JavaScript to automatically fix the rag of any body of text. Where you allow your lines to break in a block of text can be very important for readability, and quite tricky within a fluid layout. With this script you can set how and where you want your lines to break, creating a much more pleasing text rag.

“There are only two parameters to set:

“ragadjust(elements, method);
“• Elements – A CSS selector list of the elements you wish to modify.
“• Method – Choose which rag-adjust method you want to employ.
“— emphasis – Text of three or less words in bold or italics does not break across lines.
“— small-words – Breaks lines before words of three or less characters.
“— prepositions – Breaks lines before prepositions.
“— dashes – Breaks lines before hyphens and dashes.”

(via: http://artequalswork.com)
typography  javascript  blogging  handcoding  2014  artequalswork 
4 days ago by handcoding
What Input?
“A global utility for tracking the current input method (mouse, keyboard, or touch), as well as the current intent (mouse, keyboard, or touch).”
javascript  mouse  keyboard  2019  touch 
may 2019 by handcoding
CSS classes reference — highlight.js 9.12.0 documentation
If you should need to reference a specific language for a highlighting style for Highlight.js, this page has the full list.
highlight.js  syntaxhighlighting  javascript  syntax  highlighting  2019 
april 2019 by handcoding
AppleScript and JavaScript for Automation to get frontmost tab’s url and title of various browsers.
This page pretty much has the motherlode for AppleScript and JXA for getting the current URL and page title in Safari, Safari Technical Preview, Chrome, and even Opera.
applescript  jxa  javascript  mac  macos  osx  gist  canonical  safari  chrome  keyboardmaestro  2019 
april 2019 by handcoding
Home · JXA-Cookbook/JXA-Cookbook Wiki · GitHub
“JavaScript for Automation is a new feature in OS X Yosemite. It lets you control applications and the operating system using JavaScript language.”
jxa  automation  javascript  macos  mac  osx  2019 
march 2019 by handcoding
Javascript for Automation in macOS – Hacker Noon
“There is a panel in Script Editor for viewing property list of the applications. This is for helping you to figure out how to command macOS applications via JXA. You can view it by opening Script Editor and clicking on one of these menu items: File > Open Dictionary or Window > Library.”
javascript  automation  mac  osx  macos  2017  jxa 
march 2019 by handcoding
194028 – Add limits to the amount of JavaScript that can be loaded by a website
“The situation I’m envisioning is that a site can show me any advertising they want as long as they keep the overall size under a fixed amount, say one megabyte per page. If they work hard to make their site efficient, I’m happy to provide my eyeballs.

“If these limits are deployed in WebKit on iOS, there will also be an immediate incentive for web developers to be more efficient with their content. A wonderful side-effect is that other platforms will benefit from that incentive.”
webkit  bugzilla  javascript  2019 
january 2019 by handcoding
The Great Divide | CSS-Tricks
“Another source of frustration is when the great divide leads to poor craftsmanship. This is what I see as the cause of most of the jeering and poking that occurs across aisles. Brad Frost points to the term ‘full-stack developer’ as a little misleading:

“In my experience, ‘full-stack developers’ always translates to ‘programmers who can do front-end code because they have to and it’s ‘easy’.’ It’s never the other way around. The term ‘full-stack developer’ implies that a developer is equally adept at both frontend code and backend code, but I’ve never in my personal experience witnessed anyone who truly fits that description.”
csstricks  frontend  frontenddevelopers  2019  javascript  css 
january 2019 by handcoding
JavaScript Access to Iframe and its Document and Content
“On this page we use JavaScript to interact with an iframe and the document inside it. First we show how to obtain references to the iframe and its properties and contents. Then we provide an example below which demonstrates how to get and set properties of the iframe, access variables and invoke functions in the iframed document, and reference and modify its elements.”
iframes  2018  javascript 
august 2018 by handcoding
Set focus to an element in an iframe : alexking.org
“If you’re trying to set focus to an element in an iframe that has already been loaded, you need to set focus to the iframe first, then to the element.”
iframes  focus  alexking  2016  javascript 
august 2018 by handcoding
Michael Tsai - Blog - Page Lifecycle API
“As I was doing my research for the article, I found a lot of things that really surprised me. And I feel pretty confident in saying that most web developers aren’t aware of these things either.

“Here are my top four:

“- We shouldn’t use the unload event. Ever.
“- The unload event often doesn’t fire when closing tabs/app on mobile
“- The pagehide/pageshow events even exist (virtually no one I’ve talked to knows what they do; most people think they’re about page visibility).
“- In browsers that implement a page navigation cache, you can click a link to navigate away and then navigate back with the back button, and all your JS code is exactly as it was before you navigated.”
lifecycle  mjtsai  2018  javascript 
july 2018 by handcoding
smartquotes.js
“Smartquotes.js is here to convert all your dumb quotes back to smart ones.”
quotes  2018  javascript  smartquotes  typography 
may 2018 by handcoding
pnevyk/tipograph: Library which transforms your text input into typographically correct sequence of characters.
“A little JavaScript library and command line tool that makes your written content more typographically correct.”
javascript  libraries  quotes  smartquotes  typography  2018 
may 2018 by handcoding
Implementing a reduced-motion mode
“There are quite a few reasons for someone not to want animations. Some people suffer from motion sickness. Some people suffer from ADHD. Some people simply don’t like the fancy woosh-swoosh.

“It turns out implementing an option for users to disable animations across the board is surprisingly easy. This is what we’ve done at N26 as part of the rewriting of the web application. Here’s how we did it, and how you could too.”
css  motion  prefers-reduced-motion  accessibility  a11y  2018  javascript 
march 2018 by handcoding
Find every matching item in an array with vanilla JavaScript | Go Make Things
“The Array.filter() method creates a new array with only elements that pass a test you include as a callback function.

“In that callback, pass in an argument name to represent the current item the filter() method is evaluating (it can be anything). In the callback itself, test if the current item matches what you’re looking for and return a boolean.“
(via: https://twitter.com/ChrisFerdinandi/status/978286415673925633)
arrays  es6  javascript  2018 
march 2018 by handcoding
uzairfarooq/arrive: Watch for DOM elements creation and removal
Brett Terpstra called this "A handy javascript wrapper for Mutation Observer, used to detect the arrival (or removal) of DOM elements without polling."
(via: http://brettterpstra.com/2018/02/13/web-excursions-for-february-13-2018/)
javascript  mutationobserver  via:brettterpstra  2018 
february 2018 by handcoding
xi/aria-api: Access ARIA information from JavaScript
This JavaScript library lets you calculate the ARIA role of any element within the DOM.
javascript  libraries  dom  aria  accessibility  a11y  2018 
january 2018 by handcoding
Autoplay Policy Changes  |  Web  |  Google Developers
"Chrome's autoplay policies will change in January of 2018 and I'm here to tell you why and how this is going to affect video playback with sound. Spoiler alert: users are going to love it!"
chrome  video  autoplay  2018  javascript 
january 2018 by handcoding
FilePond
"FilePond is a JavaScript plugin that brings silky smooth drag n’ drop file uploading. These docs they will help install, setup, modify and extend FilePond."
javascript  libraries  upload  2017 
december 2017 by handcoding
Just Animate - Robust JavaScript animation library
via @rachelnabors: "Just Animate is a robust JavaScript animation library sporting yo-yo, staggered, and grouped animations. Works with the web animations API, too :)"
(via: https://twitter.com/rachelnabors/status/937759714838007814)
via:rachelnabors  javascript  animation  2017 
december 2017 by handcoding
:tabbable Selector | jQuery UI API Documentation
This jQueryUI function "Selects elements which the user can focus via tabbing."
jquery  jqueryui  tabbable  focusable  focus  accessibility  a11y  javascript  2017 
september 2017 by handcoding
jonathantneal/media-player: A tiny, totally cross browser, accessible, fully customizable media player
via @jon_neal: "I wrote a tiny, totally cross browser, accessible, fully customizable media player written in plain JavaScript.”
(via: https://twitter.com/jon_neal/status/900901456156471297)
audio  video  players  accessibility  javascript  a11y 
august 2017 by handcoding
Getting Started with JavaScript for Automation on Yosemite – MacStories
"Since JXA is so new, there obviously was not much information to go by. I've never gotten around to learning AppleScript, so articles based on the classic OS X automation language were not much help either, although I’m not sure how much they would apply anyway. The result was quite a few wasted hours trying to figure out some of the most basic parts of JXA, such as proper syntax of method calls, which method calls worked with which apps, and how to identify UI Elements in order to trigger them with UI automation. Eventually I was able to figure these things out, so now I'm back to share what I learned."
mac  osx  jxa  javascript  automation  2017 
june 2017 by handcoding
tipograph
This isn’t a bad library for dealing with smart quotes, but it still fails your test case:

I wasn't a particular fan of the music in the '80s, but then "Take on Me" came on the radio and all was right with the world. And then she blurted, "I thought you said, 'I don't like '80s music'?"
smart  smartquotes  javascript  2017 
may 2017 by handcoding
wooorm/retext-quotes: Check quote and apostrophe usage
This library aims to "Check quotes and apostrophes, and warn if their style (‘straight' or 'smart') or level of nesting is not the preferred style. All with retext."
retext  quotes  smart  keyboardmaestro  javascript  2017 
may 2017 by handcoding
wooorm/retext-contractions: Check apostrophe use in contractions
This library aims to "Check apostrophes in elided contractions: if they exist (isnt > isn’t) and if they are placed properly (is’nt > isn’t). All with retext."
contractions  javascript  2017  keyboardmaestro 
may 2017 by handcoding
smartquotes.js
"'Smart quotes,' or 'curly quotes,' are the proper typographical way to represent quotation marks. Unfortunately, in order to save space on the keyboard, the dumb quote was created. Smartquotes.js is here to convert all your dumb quotes back to smart ones."
quotes  javascript  2017  typography 
may 2017 by handcoding
javascript - How do I view events fired on an element in Chrome DevTools? - Stack Overflow
On monitoring JavaScript events in Chrome:
"You can use monitorEvents function.

"Just inspect your element (right mouse click → Inspect on visible element or go to Elements tab in Chrome Developer Tools and select wanted element) then go to Console tab and write:
monitorEvents($0)

"Now when you move mouse over this element, focus or click it, the name of the fired event will be displayed with its data.

"To stop getting this data just write this to console:
unmonitorEvents($0)
"
chrome  events  javascript  debugging  2017 
april 2017 by handcoding
ally.js
"ally.js is a JavaScript library simplifying certain accessibility features, functions and behaviors. However, simply loading ally.js will not automagically make a web application accessible. The library provides certain standard functions the "web platform" should've provided itself, so JavaScript applications can be made accessible more easily.

"ally.js has been tested on IE9+, Firefox, Chrome and Safari 9, as well as Mobile Chrome on Android 5.1 and Safari for iOS 9."
accessibility  a11y  libraries  javascript  focus  2017 
april 2017 by handcoding
Keypress: A Javascript library for capturing input
"Keypress is an input capture [keyboard shortcut] library with some very special features, it is easy to pick up and use, has a reasonable footprint (~9kb), and has no dependencies."
javascript  keyboard  libraries  keypress  keyup  keydown  2017 
march 2017 by handcoding
Plyr - A simple HTML5 media player
This is the JavaScript audio player that you’re trying out for your ACES 2017 presentation. It’s not too bad so far.
javascript  aces  aces2017  2017  audio 
march 2017 by handcoding
Fix for #77 by miripiruni · Pull Request #106 · shower/shower
(So I guess Shower kinda supports callback functions?)
"I've added callbacks for several public methods.

shower.next()
shower.previous()
shower.first()
shower.last()
shower.enterSlideMode()
shower.enterListMode()
shower.go()"
shower  presentations  javascript  callbacks  2013 
march 2017 by handcoding
JXA - JavaScript for Automation - From the Start - Questions & Suggestions - Keyboard Maestro Discourse
"JXA (JavaScript for Automation) is the JavaScript version of what AppleScript can do. There's no real difference between JXA and standard JavaScript, except for the special libraries that are available, and the environment under which it is run.

"I'll tell you right up front - getting up to speed is a daunting task, because the documentation, when there actually is some, is extremely sparse. That's why I'm hoping you're willing to document your experience, here in this topic.

"I will answer as many of your questions as I can, as will others on this forum. I'm committed to getting this documented, if you are. So that means, please bug me with every question you can think of, when you run into walls."
javascript  axa  keyboardmaestro  2016  software  automation  applescript 
march 2017 by handcoding
javascript - How do I reload a Greasemonkey script when AJAX changes the URL without reloading the page? - Stack Overflow
(On triggering a Greasemonkey script once Ajax finishes:)
"How you do this depends on the site/application and on what you are trying to do. Here are your options, easiest and most robust first:

"1. Don't try to catch URL changes. Use calls to waitForKeyElements() to act on the parts of the various pages that you wanted to manipulate in the first place. This neatly handles a whole slew of timing issues inherent with all the other approaches.
See also: "Choosing and activating the right controls on an AJAX-driven site".

"2. Just poll for URL changes. It's simple and works well in practice, with fewer timing issues than all but technique #1.

"3. If the site uses AJAX that changes the fragment (AKA "hash"), fire on the hashchange event. Alas, fewer and fewer AJAX sites do this.

"4. Use Mutation Observers to monitor changes to the <title> tag. Most AJAX pages are nice enough to change the title too. This may fire before your target content is loaded, though.

"5. Hack into the history.pushState function. This gives faster notice of page changes, BUT 95% of the time, it fires before your target elements have loaded. You will usually still need a timer. Plus, it brings in cross-scope problems, in a userscript environment.”:
ajax  greasemonkey  javascript  stackoverflow  2013 
february 2017 by handcoding
javascript - how to listen for changes to the title element? - Stack Overflow
5 years later we finally have a better solution [to detecting title changes]. Use MutationObserver!"
greasemonkey  javascript  mutationobserver  title  2013 
february 2017 by handcoding
javascript - Run Greasemonkey script on the same page, multiple times? - Stack Overflow
(Looks like waitforkeyelements() can be a handy way to deal with pages that insert content through Ajax.)
"The simplest, most robust way is to use the waitForKeyElements() utility.

"Here is a complete script that uses jQuery and waitForKeyElements to alter Amazon search results […]"
greasemonkey  waitforkeyelements  javascript  ajax  2017 
february 2017 by handcoding
Metadata Block - GreaseSpot Wiki
"@run-at
Compatibility: Greasemonkey 0.9.8+

"This key supports three values:
• document-end is the standard behavior that Greasemonkey has always had (see DOMContentLoaded). This is the default if no value is provided. The script will run after the main page is loaded, but before other resources (images, style sheets, etc.) have loaded.
• document-start is new as of version 0.9.8. The script will run before any document begins loading, thus before any scripts run or images load.
• document-idle is new as of version 3.6. The script will run after the page and all resources (images, style sheets, etc.) are loaded and page scripts have run."
greasemonkey  load  javascript  userscripts  2017 
february 2017 by handcoding
Control Freak - Chrome Web Store
"Greasemonkey-like mods, but quicker to tweak. Create and apply your own synced tweaks to web pages

"So you want to make a few tweaks to your favourite web page, but don't want to build a full-blown extension? That's what Control Freak is for."
chrome  extensions  2017  greasemonkey  javascript 
february 2017 by handcoding
URL Decoder/Encoder
Ah—it looks like this jobbie can encode or decode URLs (the %20 bits et al).
urlshortening  bookmarklets  javascript  meyerweb  20  2017 
january 2017 by handcoding
Improving The UX Of Names With Vocalizer.js – Smashing Magazine
"Over the next few weeks, I spent time converting my singular implementation into a reusable plugin. Before publicly releasing it, I stumbled upon a company called NameShouts, which is an audio-based pronunciation tool with a repository of over 70,000 name pronunciations. I reached out to them for access to their API, implemented it into my plugin, and open-sourced it."
pronunciation  javascript  2016 
december 2016 by handcoding
javascript - Textarea Auto height - Stack Overflow
(For what it’s worth, the solutions here are pretty much only JavaScript:)
"I want to make height of textarea equal to height of the text within it"
javascript  textarea  height  css  stackoverflow  2015 
november 2016 by handcoding
Pointing the Way Forward  |  Web  |  Google Developers
"Pointer events unify the pointer input model for the browser, bringing touch, pens, and mice together into a single set of events."
pointerevents  pointer  events  javascript  2016 
october 2016 by handcoding
Set a default parameter value for a JavaScript function - Stack Overflow
This thread goes over some options for setting default JavaScript parameters.

For instance:
function read_file(file, delete_after) {
delete_after = delete_after || "my default here";
//rest of code
}
javascript  stackoverflow  2009  default  parameters 
september 2016 by handcoding
Remote debugging iOS Safari on OS X, Windows and Linux
This page goes over how you can open web pages in iOS Safari and debug them using the developer tools on your desktop Mac.
safari  ios  inspector  css  javascript  2016  tutorials  canonical 
september 2016 by handcoding
Use concept naming to simplify and clarify your Javascript conditions | dvolvr
"The benefits of writing simple, clear and human-readable Javascript code are well known if not always well practiced.  The other day, while skimming the source of some of the rules bundled with ESLint, I was pleasantly surprised to see many of them made use of “concept naming” for conditions. This is a practice common in many other programming languages but not something I see being used in Javascript very often, despite the benefits."
javascript  bestpractices  variables  2016 
august 2016 by handcoding
javascript - Can I find events bound on an element with jQuery? - Stack Overflow
"In modern versions of jQuery, you would use the $._data method to find any events attached by jQuery to the element in question.”

For instance, they offer this example:
// Lookup events for this particular Element
​$._data( $("#foo")[0], "events" );
jquery  javascript  events  eventhandlers  2016 
august 2016 by handcoding
javascript - Repeat Character N Times - Stack Overflow
Some JavaScript to get a string that repeats a certain character “n” times:

"Array(11).join("a")
(Note that an array of length 11 gets you only 10 "a"s, since Array.join puts the argument between the array elements.)"
javascript  strings  stackoverflow  2009  repeat 
august 2016 by handcoding
The Typekit Blog | Flexible typography with CSS locks
(This might be worth looking into:)
"In early 2012, I shared a formula for “molten leading”, or fluid line spacing. Experienced typographers know that long lines of text need more line spacing, but line spacing can be tighter for short lines of text. The problem is that on the web, our texts are flexible. So our line spacing needs to flex, too."
typography  css  javascript  2016 
august 2016 by handcoding
How to Create a Basic Plugin | jQuery Learning Center
via @dennisl: "Useful for jQuery nerds: How to Create a Basic Plugin"
jquery  javascript  plugins  2016  tutorials 
july 2016 by handcoding
Use Regular Expressions in TextExpander via JavaScript | Smile
This page offers a decent-ish shell for starting a JavaScript-based TextExpander snippet (especially for regex-based bits).
regex  textexpander  javascript  2016 
july 2016 by handcoding
Allan Jardine | Reflections | Visual Event 2
"Visual Event is an open source Javascript bookmarklet which provides debugging information about events that have been attached to DOM elements."
javascript  events  bookmarklets  2016 
july 2016 by handcoding
javascript - JS regex to split by line - Stack Overflow
On splitting a JavaScript string into its component lines:
"Use
result = subject.split(/\r?\n/);
Your regex returns line1 twice because line1 is both the entire match and the contents of the first capturing group."
javascript  regex  strings  textexpander  2014 
july 2016 by handcoding
Introduction to JavaScript for Automation Release Notes
(In case you get ever like to try using JavaScript Automation within TextExpander:)
"JavaScript for Automation provides the ability to use JavaScript for interapplication communication between apps in OS X.

This document describes significant changes to JavaScript for Automation (JXA) and related tools in OS X."
(via: http://brettterpstra.com/2015/06/01/textexpander-5-javascript-snippets/)
javascript  textexpander  2016  apple  documentation 
july 2016 by handcoding
Bookmarkleter
"You have JavaScript. You need a bookmarklet. This does that.”

The basic process to creating a bookmarklet:
1. Write a JavaScript shell with these bits:
javascript:(function()
{
[…]
})();

2. Replace the “[…]” with your code.

3. Paste your code into this page, but uncheck “Wrap in an IIFE” and uncheck “Minify using UglifyJS."
bookmarklets  generator  2016  javascript 
july 2016 by handcoding
GitHub - edenspiekermann/a11y-dialog: A very lightweight and flexible accessible modal dialog.
"This repository is a fork from accessible-modal-dialog by Greg Kraus. We at Edenspiekermann are big fans of the original version, although we discovered we could improve it and make it even better. On top of that, the original script depends on jQuery, which happened to be a problem for us.

"The original repository being apparently unmaintained, we decided to fork it and release our own version of the accessible modal dialog. All credits to the original author."
a11y  accessibility  javascript  dialog  lightbox  2016 
june 2016 by handcoding
Sample JavaScripts for TextExpander 5.0 / TextExpander touch 3.5 | Smile
"TextExpander 5.0 and TextExpander 3.5 add support for JavaScript snippets. JavaScript includes a very nice math library, so in addition to having snippets which run on both OS X and iOS, there are a number of snippets which are easier to write. Here are some examples of snippets you can make by setting the Content: menu of a new snippet to JavaScript, and pasting the following into the editor."
textexpander  javascript  quickreference  2016 
may 2016 by handcoding
TextExpander: Clipboard Underlining - Home - Thought Asylum
This post goes over a trick of using JavaScript snippets with functions within TextExpander.
textexpander  2015  javascript  snippets  functions 
may 2016 by handcoding
715649104634912768
Ooh—these JavaScript-based snippets for TextExpander look rather intriguing.

"@JackWellborn: Those who regularly file bugs and are considering @TextExpander, but question the cost, consider the following…"
javascript  textexpander  2016 
april 2016 by handcoding
TextExpander 5 JavaScript snippets - BrettTerpstra.com
"I mentioned the release of TextExpander 5 last week, and the fact that it now allows snippets to be written using JavaScript.

"You can find the documentation for JavaScript in TextExpander in the help book. I started playing with it a bit over the weekend, and thought I’d share a couple of findings."

Also, this example script looks like it could be handy in its own right:
"As an example of some of my experimentation, I’ve added a new group to the TE-tools called “Next X.” It provides a JavaScript strftime library, which it nests into snippets for each day of the week. Then you can use nd.tue to insert the date for the next Tuesday in the calendar while typing. nd.sun through nd.sat are available.

"By default, dates are inserted in the format “Tuesday, June 02.” Each snippet has a line at the top like this:"
textexpander  javascript  scripting  snippets  2015  bretterpstra 
february 2016 by handcoding
Fun with TextExpander and Scripting | Smile
"TextExpander 5 adds support for JavaScript snippets, which can be run on all of your devices – Macs, iPads, and iPhones. Here is a sample script which rounds the current date to the nearest 5 minute interval:"
textexpander  javascript  snippets  2016 
february 2016 by handcoding
URL Length Limits - IEInternals - Site Home - MSDN Blogs
On the length limit for bookmarklets:
"The JavaScript protocol is used for bookmarklets (aka favlets), a lightweight form of extensibility that permits a user to click a button and run some stored JavaScript on the currently loaded page. In IE9, the team did some work to relax the length limit (from ~260 characters, if I recall correctly) to something significantly larger (~5kb, if I recall correctly)."
bookmarklets  javascript  ie  2014 
february 2016 by handcoding
Presentation Mode - CodePen Blog
Looks like “Presentation Mode”, a Pro feature, could be handy if you should ever need to share code at a conference or the like.
codepen  pasteboards  2016  presentationmode  markup  css  javascript 
february 2016 by handcoding
forceFeed.js—Static mockups are liars. They only show optimal content.
"The forceFeed.js script is designed to help you test your design's tolerance for variable, dynamic content. A tiny script that "force feeds" HTML elements with random text content within specified parameters. Set up, keep refreshing your browser until something breaks, then fix the design."
via:heydonworks  javascript  content  loremipsum  2016 
january 2016 by handcoding
Does Google crawl and index dynamic content?
"Update this was posted to Google on Friday the 17th of July, 2015. Monday, the 20th, I checked the results. The management summary: Google crawls and indexes all content injected by javascript, independent of whether it is synchronously or asynchronously injected. However, JSON-LD content fails to show up in the search results."
google  javascript  2015  seo 
january 2016 by handcoding
Making Accessibility Simpler, With Ally.js – Smashing Magazine
"ally.js is a JavaScript library to help modern web applications with accessibility concerns by making accessibility simpler."
accessibility  a11y  2015  javascript 
december 2015 by handcoding
CodePen - Front End Developer Playground & Code Editor in the Browser
It looks like this is the new hotness among HTML/CSS/JavaScript pasteboards (like JSBin and the like).
jsbin  pasteboard  javascript  css  markup  2015  code 
november 2015 by handcoding
Using the oninput event handler with onkeyup/onkeydown as its fallback · Mathias Bynens
[This apparently works in IE9 and above.] "HTML5 standardizes the oninput event handler, which should be used to detect user input in JavaScript. Sure, you could use onkeydown or onkeyup instead, but those were never really designed for this particular use case, and it shows.” (via: https://twitter.com/mathias/status/6592933811772661760)
input  events  eventhandlers  javascript  2015  forms  via:mathias 
october 2015 by handcoding
Basic autocomplete (activedescendent)
via @heydonworks: "I made an #a11y autocomplete with listbox demo. Works a treat in NVDA/JAW+FF/Chrome."
accessibility  a11y  autocomplete  javascript  2015  listbox 
october 2015 by handcoding
F2E Summit 2015: Everything you need to know about Javascript Accessibility.. by Karl Groves - YouTube
"Is it really possible to understand JavaScript and accessibility in 40 minutes? This presentation will discuss touch on all of the major concerns with dynamic content and accessibility. It could be awesome or it could be a disaster, but one thing's for sure: there will be no slides, just live coding." (About 35:22)
karlgroves  accessibility  a11y  video  youtube  javascript 
october 2015 by handcoding
getElementsByClassName() doesn't work with multiple class names · Issue #1232 · tmpvar/jsdom · GitHub
via @domenic: "Did you know? you can pass a space-separated list of class names to getElementsByClassName."
getElementsByClassName  javascript  2015  domscripting 
september 2015 by handcoding
svinkle/a11yclick
"Easily handle keyboard click events on non semantic button elements." (Karl made this.)

(More inför about this at: http://www.karlgroves.com/2014/11/24/ridiculously-easy-trick-for-keyboard-accessibility/)
accessibility  a11y  2015  keyboard  click  javascript 
september 2015 by handcoding
Bustle
"Have you ever wished spell-check could correct offensive language in addition to improper spelling and grammar? Then JavaScript tool Alex — whose slogan is "catch insensitive, inconsiderate writing" — has come to the rescue. As you type, Alex lets you know if a word or phrase you're using is sexist, heteronormative, cissexist, or any of the other lovely forms of discrimination lurking within the English language and suggests other options."
javascript  language  sjw  2015 
september 2015 by handcoding
Arrow: better dates and times for Python — Arrow 0.4.4 documentation
"Arrow is a Python library that offers a sensible, human-friendly approach to creating, manipulating, formatting and converting dates, times, and timestamps. It implements and updates the datetime type, plugging gaps in functionality, and provides an intelligent module API that supports many common creation scenarios. Simply put, it helps you work with dates and times with fewer imports and a lot less code.

"Arrow is heavily inspired by moment.js and requests." (Never mind so much the Python bits here, but perhaps Moment.js might be worth a look if you should need a JavaScript date library?)
javascript  dates  python  2015 
september 2015 by handcoding
JavaScript date manipulations in TextExpander - All this
"fiddling with the arguments to the format method, you can get pretty much any output you like. And the great thing is that unlike AppleScript snippets, JavaScript snippets can be used in both the OS X version and the iOS version (as long as you don’t invoke any JavaScript for Automation functions)."
javascript  dates  textexpander  2015  drdrang 
july 2015 by handcoding
« earlier      
per page:    204080120160

Copy this bookmark:





to read