This file contains 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
getPromiseWithProgress(resolver){ | |
return new (function PromiseWithProgress(){ | |
let observers = [], | |
blockNotify = false, | |
notify = data => !blockNotify && observers.forEach(observer => observer(data)), | |
promise = new Promise((resolve, reject) => resolver(resolve, reject, notify)) | |
this.progress = function(observer){ typeof observer === 'function' && observers.push(observer); return this } |
This file contains 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
class Observable { | |
constructor(){ | |
this.observers = [] | |
} | |
add(callback){ |
This file contains 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
(function(factory){ | |
if ( typeof define === 'function' && define.amd ) { | |
// AMD. Register as an anonymous module. | |
define(factory); | |
} else if (typeof exports === 'object') { | |
// Node/CommonJS style for Browserify |
This file contains 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
<Countries> | |
<Country name="Afghanistan" iso2="AF" iso3="AFG" id="004" /> | |
<Country name="Aland Islands" iso2="AX" iso3="ALA" id="248" /> | |
<Country name="Albania" iso2="AL" iso3="ALB" id="008" /> | |
<Country name="Algeria" iso2="DZ" iso3="DZA" id="012" /> | |
<Country name="American Samoa" iso2="AS" iso3="ASM" id="016" /> | |
<Country name="Andorra" iso2="AD" iso3="AND" id="020" /> | |
<Country name="Angola" iso2="AO" iso3="AGO" id="024" /> | |
<Country name="Anguilla" iso2="AI" iso3="AIA" id="660" /> | |
<Country name="Antarctica" iso2="AQ" iso3="ATA" id="010" /> |
This file contains 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
<?xml version='1.0' encoding='UTF-8'?> | |
<countries> | |
<country code='af' handle='afghanistan' continent='asia' iso='4'>Afghanistan</country> | |
<country code='al' handle='albania' continent='europe' iso='8'>Albania</country> | |
<country code='dz' handle='algeria' continent='africa' iso='12'>Algeria</country> | |
<country code='as' handle='american-samoa' continent='polynesia' iso='16'>American Samoa</country> | |
<country code='ad' handle='andorra' continent='europe' iso='20'>Andorra</country> | |
<country code='ao' handle='angola' continent='africa' iso='24'>Angola</country> | |
<country code='ai' handle='anguilla' continent='north america' iso='660'>Anguilla</country> | |
<country code='aq' handle='antarctica' continent='antarctica' iso='10'>Antarctica</country> |
This file contains 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
<select name="Nationality" data-autocomplete="" class="ec-ac-select"> | |
<option value="" selected="">Desconocido</option> | |
<option value="AFG">Afghanistan</option> | |
<option value="ALA">Åland Islands</option> | |
<option value="ALB">Albania</option> | |
<option value="DZA">Algeria</option> | |
<option value="ASM">American Samoa</option> | |
<option value="AND">Andorra</option> | |
<option value="AGO">Angola</option> | |
<option value="AIA">Anguilla</option> |
This file contains 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
<Countries> | |
<Country name="Afghanistan" iso3="AFG" id="004"/> | |
<Country name="Åland Islands" iso3="ALA" id="248"/> | |
<Country name="Albania" iso3="ALB" id="008"/> | |
<Country name="Algeria" iso3="DZA" id="012"/> | |
<Country name="American Samoa" iso3="ASM" id="016"/> | |
<Country name="Andorra" iso3="AND" id="020"/> | |
<Country name="Angola" iso3="AGO" id="024"/> | |
<Country name="Anguilla" iso3="AIA" id="660"/> | |
<Country name="Antarctica" iso3="ATA" id="010"/> |
This file contains 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
<select name="nationality"> | |
<option value="">-- select one --</option> | |
<option value="afghan">Afghan</option> | |
<option value="albanian">Albanian</option> | |
<option value="algerian">Algerian</option> | |
<option value="american">American</option> | |
<option value="andorran">Andorran</option> | |
<option value="angolan">Angolan</option> | |
<option value="antiguans">Antiguans</option> | |
<option value="argentinean">Argentinean</option> |
This file contains 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
function queryStringToJSON(string){ | |
var result = {}; | |
string.replace(/([^;&]+)[=:]+([^;&]+)/g, function(match, key, value, begin, fullstring){ | |
result[key] = value; | |
}); | |
This file contains 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
(function(w, d, $, undefined){ | |
$.LoadImages = function(){ | |
var deferreds = []; | |
$.each(arguments, function(i, url){ | |
var | |
img = d.createElement('img'), |
NewerOlder