I hereby claim:
- I am fdn on github.
- I am fdn (https://keybase.io/fdn) on keybase.
- I have a public key whose fingerprint is 3837 EE29 D0BE 95A2 3956 C4D8 4ED2 18FF F2E2 E780
To claim this, I am signing this object:
I hereby claim:
To claim this, I am signing this object:
function onSubmit() { | |
// we did some validation? | |
if (isValidated) { | |
console.log('Form checks out!'); | |
} | |
return true; | |
} |
angular.module('appModuleName').config(function() { | |
'use strict'; | |
var JQLite = angular.element; | |
/** | |
* Augment find() to support selectors | |
*/ | |
var _find = JQLite.prototype.find; |
/** | |
* Console.log with call location and grouping to reduce log noise. | |
* Apply directly to code once. | |
* | |
* Original: http://remysharp.com/2014/05/23/where-is-that-console-log/ | |
*/ | |
var groupable = typeof console.groupCollapsed !== 'undefined'; | |
['log', 'warn'].forEach(function(method) { | |
var old = console[method]; | |
console[method] = function() { |
// via http://blog.adtile.me/2014/01/16/a-dive-into-plain-javascript/ | |
// Determine if an element is in the visible viewport | |
function isInViewport(element) { | |
var rect = element.getBoundingClientRect(); | |
var html = document.documentElement; | |
return ( | |
rect.top >= 0 && | |
rect.left >= 0 && | |
rect.bottom <= (window.innerHeight || html.clientHeight) && | |
rect.right <= (window.innerWidth || html.clientWidth) |