Skip to content

Instantly share code, notes, and snippets.

View uguratar's full-sized avatar

Uğur Atar uguratar

View GitHub Profile
(function(k,p){function v(a){var b=a.length,d=c.type(a);return c.isWindow(a)?!1:1===a.nodeType&&b?!0:"array"===d||"function"!==d&&(0===b||"number"===typeof b&&0<b&&b-1 in a)}function t(a){var b=la[a]={};c.each(a.match(M)||[],function(a,c){b[c]=!0});return b}function R(a,b,d,e){if(c.acceptData(a)){var f=c.expando,g=a.nodeType,h=g?c.cache:a,l=g?a[f]:a[f]&&f;if(l&&h[l]&&(e||h[l].data)||!(d===p&&"string"===typeof b)){l||(l=g?a[f]=da.pop()||c.guid++:f);h[l]||(h[l]=g?{}:{toJSON:c.noop});if("object"===typeof b||
"function"===typeof b)e?h[l]=c.extend(h[l],b):h[l].data=c.extend(h[l].data,b);a=h[l];e||(a.data||(a.data={}),a=a.data);d!==p&&(a[c.camelCase(b)]=d);"string"===typeof b?(d=a[b],null==d&&(d=a[c.camelCase(b)])):d=a;return d}}}function ca(a,b,d){if(c.acceptData(a)){var e,f,g=a.nodeType,h=g?c.cache:a,l=g?a[c.expando]:c.expando;if(h[l]){if(b&&(e=d?h[l]:h[l].data)){c.isArray(b)?b=b.concat(c.map(b,c.camelCase)):b in e?b=[b]:(b=c.camelCase(b),b=b in e?[b]:b.split(" "));for(f=b.length;f--;)delete e[b[f]];if(d?
!W(e):!
/* Snowfall pure js
====================================================================
LICENSE
====================================================================
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
function loadScript(url, callback)
{
// Adding the script tag to the head as suggested before
var head = document.getElementsByTagName('head')[0];
var script = document.createElement('script');
script.type = 'text/javascript';
script.src = url;
// Then bind the event to the callback function.
// There are several events for cross browser compatibility.