Skip to content

Instantly share code, notes, and snippets.

@OrenShalev
OrenShalev / create.js
Last active June 30, 2016 04:33 — forked from artjomb/create.js
ECMAScript 6 capability of PhantomJS 2.1.1
// Run this from dev tools on http://kangax.github.io/compat-table/es6/ to get compat data for current browser.
// Adapted from phantomjs standalone script.
(function getEs6Data(){
var result = (function(){
var data = {};
var forEach = Array.prototype.forEach;
var tw = document.getElementById('table-wrapper');
forEach.call(tw.querySelectorAll('tr:not(.size-row):not(.subtest):not(.category)'), function (st) {
@OrenShalev
OrenShalev / controller.js
Last active January 6, 2016 11:18 — forked from BobNisco/controller.js
onLongPress AngularJS Directive - Great for mobile!
// Somewhere in your controllers for this given example
// Example functions
$scope.itemOnLongPress = function(id) {
console.log('Long press');
}
$scope.itemOnMouseUp = function(id) {
console.log('Mouse up');
}