Skip to content

Instantly share code, notes, and snippets.

@jenyayel
jenyayel / domainsTester.js
Last active October 21, 2016 20:52
Tests a list of domains whether they blocked by proxy or by ISP
// This scripts tests a list of domains whether they blocked by proxy or by ISP
// the tests relies on image object loading and its native events.
// The domains are queued in FIFO and tested one by one until the non-blocked domain found.
//
// usage:
// tester.validateDomains(['//domain1.com', '//domain2.com'], '/favicon.ico')
// .done(function (domain) {
// // one of the domains is OK
// })
// .fail(function () {