Skip to content

Instantly share code, notes, and snippets.

View websemantics's full-sized avatar

Adnan M.Sagar, PhD websemantics

View GitHub Profile
@websemantics
websemantics / cross-domain-ajax.js
Created June 2, 2016 04:06
Extends Ajax to strictly use Yahoo Query Language for CROSS-DOMAIN Ajax.
$.ajax = (function (ajax) {
return function (o) {
o.dataType = 'json'
o.data = {
q: 'select * from html where url="' + (o.url + (o.data ? (/\?/.test(o.url) ? '&' : '?') + $.param(o.data) : '') + '" and xpath="*"'),
format: 'xml'
}
o.url = 'http' + (/^https/.test(location.protocol) ? 's' : '') + '://query.yahooapis.com/v1/public/yql?callback=?'
o.success = (function (success) {
return function (data) {
{
"global": {
"color": {
"white": "#ffffff",
"shadow": "#494949",
"boxed": "#367dbc",
"symbol": "#73371e",
"primary": "{{ color.brown }}",
"brown": "#fece99",
"fresh": "#ddec87",
@websemantics
websemantics / vimeo-upload.html
Created October 21, 2015 13:23
A Polymer 0.5 element for Vimeo video uploads that supports Browser and Cordova apps.
<!--
* vimeo-upload
*
* The `vimeo-upload` element enabling you to upload videos to Vimeo
*
* Examples
*
* Manual upload with a `Video Upload` button once a video file is selected:
*
* <vimeo-upload></vimeo-upload>