This file contains hidden or 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
// Changes XML to JSON | |
// Modified version from here: http://davidwalsh.name/convert-xml-json | |
function xmlToJson(xml) { | |
// Create the return object | |
var obj = {}; | |
if (xml.nodeType == 1) { // element | |
// do attributes | |
if (xml.attributes.length > 0) { |
This file contains hidden or 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
/** | |
* Originally from http://davidwalsh.name/convert-xml-json | |
* This is a version that provides a JSON object without the attributes and places textNodes as values | |
* rather than an object with the textNode in it. | |
* 27/11/2012 | |
* Ben Chidgey | |
* | |
* @param xml | |
* @return {*} | |
*/ |
This file contains hidden or 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
// Changes XML to JSON | |
// fixed some bugs from http://davidwalsh.name/convert-xml-json | |
// October 9, 2012 | |
// Brian Hurlow | |
function xmlToJson(xml) { | |
// Create the return object | |
var obj = {}; | |
// console.log(xml.nodeType, xml.nodeName ); |
This file contains hidden or 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
{ | |
"application_id":"YOUR_APP_ID", | |
"src":"http://cdn.blitline.com/filters/boys.jpeg", | |
"functions":[ | |
{ | |
"name":"convert_command", | |
"params":{ | |
"-function":"polynomial 3.5,-5.05,2.05,0.3", | |
"-channel":"R" | |
}, |
This file contains hidden or 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
// use jQuery shipped with Uploadcare | |
$ = uploadcare.jQuery; | |
var widget = uploadcare.MultipleWidget('input'); | |
// disable submit button | |
$('#submit').attr('disabled', true); | |
widget.onUploadComplete(function(info) { | |
// upload is complete | |
console.log(info); |
This file contains hidden or 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
<!DOCTYPE html> | |
<html> | |
<head> | |
<meta charset="utf-8"> | |
<meta name="viewport" content="width=device-width"> | |
<title>JS Bin</title> | |
</head> | |
<body> | |
<div id="app"> | |
<router-view class="view"></router-view> |
This file contains hidden or 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
{ | |
"application_id":"YOUR_APP_ID", | |
"src":"https://s3.amazonaws.com/dev.blitline/sample.svg", | |
"functions":[ | |
{ | |
"name":"resize_to_fit", | |
"params":{ | |
"width" : 400 | |
}, | |
"save":{ |
This file contains hidden or 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
{ | |
"application_id": "YOUR_APP_ID", | |
"src": "https://s3.amazonaws.com/img.blitline/filters/boys.jpeg", | |
"functions": [ | |
{ | |
"name": "composite", | |
"params": { | |
"src": "https://s3.amazonaws.com/img.blitline/grad_vignette_index.png" | |
}, | |
"functions": [ |
This file contains hidden or 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
// Use Gists to store code you would like to remember later on | |
console.log(window); // log the "window" object to the console |