This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
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; | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
* 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() { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// ==UserScript== | |
// @name UTM param stripper | |
// @author Paul Irish | |
// @namespace http://github.com/paulirish | |
// @version 1.1 | |
// @description Drop the UTM params from a URL when the page loads. | |
// @extra Cuz you know they're all ugly n shit. | |
// @include http://* | |
// ==/UserScript== |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
MDN: using the button role https://developer.mozilla.org/en/Accessibility/ARIA/ARIA_Techniques/Using_the_button_role | |
----- | |
Warning: Be careful when marking up links with the button role. Buttons are expected to be triggered using the Space key, | |
while links are expected to be triggered through the Enter key. In other words, when links are used to behave like buttons, | |
adding role="button" alone is not sufficient. It will also be necessary to add a key event handler that listens for the | |
Space key in order to be consistent with native buttons. | |
----- | |
*/ |