I hereby claim:
- I am matijs on github.
- I am matijs (https://keybase.io/matijs) on keybase.
- I have a public key whose fingerprint is F561 2602 AC9A 189A 0894 19D2 1D57 5FD0 310D EF84
To claim this, I am signing this object:
/* | |
Show a progress element for any form submission via POST. | |
Prevent the form element from being submitted twice. | |
*/ | |
(function ( win, doc ) { | |
'use strict'; | |
if ( !win.addEventListener ) { | |
// doesn't cut the mustard. | |
return; | |
} |
I hereby claim:
To claim this, I am signing this object:
<!DOCTYPE html> | |
<html> | |
<head> | |
<meta charset="utf-8"> | |
<title>Overlay modals</title> | |
<meta name="viewport" content="width=device-width,initial-scale=1"> | |
<link rel="stylesheet" href="main.css"> | |
</head> | |
<body> | |
<div class="overlay align-top"> |
var hasTransforms = (function() { | |
var propNames = ["transform", "MozTransform", "webkitTransform", "msTransform"]; | |
var i = 0; | |
var length = propNames.length; | |
for (; i < length; i++) { | |
if (typeof document.documentElement.style[propNames[i]] === "string") return true; | |
} | |
return false; | |
}()); |
/* | |
* How to get the scrolling element in charge of scrolling the viewport: | |
* | |
* - in Quirks mode the scrolling element is the "body" | |
* - in Standard mode the scrolling element is the "documentElement" | |
* | |
* webkit based browsers always use the "body" element disrespectfull of the specifications: | |
* http://dev.w3.org/csswg/cssom-view/#dom-element-scrolltop | |
*/ | |
function getScrollingElement() { |
$(function() { | |
'use strict'; | |
// generic click handler | |
$(document).on('click', '[data-handler]', function(event) { | |
var handler = this.getAttribute('data-handler'); | |
// honour default behaviour when using modifier keys when clicking | |
// for example: | |
// cmd + click / ctrl + click opens a link in a new tab | |
// shift + click opens a link in a new window | |
if (this.tagName === 'A' && (event.metaKey || event.ctrlKey || event.shiftKey)) { |
$(function() { | |
'use strict'; | |
// kick off js enhancements | |
$('[data-enhancer]').each(function() { | |
var enhancer = this.getAttribute('data-enhancer'); | |
if (enhancers && typeof enhancers[enhancer] === 'function') { | |
enhancers[enhancer].call(this); | |
} | |
else { | |
if (window.console && typeof console.log === 'function') { |
function loadCSS(href, options){ | |
'use strict'; | |
options = options || {}; | |
var styleSheet = document.createElement('link'); | |
var ref = options.before || document.getElementsByTagName('script')[0]; | |
styleSheet.media = 'not all'; | |
styleSheet.rel = 'stylesheet'; | |
styleSheet.href = href; | |
styleSheet.onload = function () { | |
styleSheet.onload = null; // only run once |
"""Simple HTTP Server. | |
This module builds on BaseHTTPServer by implementing the standard GET | |
and HEAD requests in a fairly straightforward manner. | |
""" | |
__version__ = "0.6" |
<p> | |
<a href="#" class="button">Foo Bar</a> | |
<button type="button" class="button">Baz Quux</button> | |
</p> |