Skip to content

Instantly share code, notes, and snippets.

jQueryDom.prototype.openFile = function(callback, accept) {
// Check for the various File API support.
if (window.File && window.FileReader && window.FileList && window.Blob) {
// Great success! All the File APIs are supported.
var acceptInsert = "";
if(accept)
acceptInsert = "accept='" + accept + "'";
var fileInput = $("<input type='file' name='files[]' " + acceptInsert + "/>");
$("body").append(fileInput);
@danielrenne-atl
danielrenne-atl / githubPushPayload.json
Created July 14, 2016 19:56
Github Push Event JSON Payload
{
"ref": "refs/heads/changes",
"before": "9049f1265b7d61be4a8904a9a27120d2064dab3b",
"after": "0d1a26e67d8f5eaf1f6ba5c57fc3c7d91ac0fd1c",
"created": false,
"deleted": false,
"forced": false,
"base_ref": null,
"compare": "https://github.com/baxterthehacker/public-repo/compare/9049f1265b7d...0d1a26e67d8f",
"commits": [