Sha256: e42f413f93b857822d19f572601ed72cf6558bf4e8049dfafa2636d2db08bf02

Contents?: true

Size: 803 Bytes

Versions: 106

Compression:

Stored size: 803 Bytes

Contents

/* ping.js - v0.2.2 http://github.com/alfg/ping.js */
var Ping=function(a){this.opt=a||{},this.favicon=this.opt.favicon||"/favicon.ico",this.timeout=this.opt.timeout||0,this.logError=this.opt.logError||!1};Ping.prototype.ping=function(a,b){function c(a){f.wasSuccess=!0,e.call(f,a)}function d(a){f.wasSuccess=!1,e.call(f,a)}function e(){g&&clearTimeout(g);var a=new Date-h;if("function"==typeof b)return this.wasSuccess?b(null,a):(f.logError&&console.error("error loading resource"),b("error",a))}var f=this;f.wasSuccess=!1,f.img=new Image,f.img.onload=c,f.img.onerror=d;var g,h=new Date;f.timeout&&(g=setTimeout(function(){e.call(f,void 0)},f.timeout)),f.img.src=a+f.favicon+"?"+ +new Date},"undefined"!=typeof exports?"undefined"!=typeof module&&module.exports&&(module.exports=Ping):window.Ping=Ping;

Version data entries

106 entries across 106 versions & 1 rubygems

Version Path
atome-0.5.6.5.7 vendor/assets/src/js/third_parties/ping.min.js
atome-0.5.6.5.6 vendor/assets/src/js/third_parties/ping.min.js
atome-0.5.6.5.4 vendor/assets/src/js/third_parties/ping.min.js
atome-0.5.6.5.1 vendor/assets/src/js/third_parties/ping.min.js
atome-0.5.6.4.8 vendor/assets/src/js/third_parties/ping.min.js
atome-0.5.6.4.5 vendor/assets/src/js/third_parties/ping.min.js
atome-0.5.6.4.2 vendor/assets/src/js/third_parties/ping.min.js
atome-0.5.6.4.1 vendor/assets/src/js/third_parties/ping.min.js
atome-0.5.6.4.0 vendor/assets/src/js/third_parties/ping.min.js
atome-0.5.6.3.9 vendor/assets/src/js/third_parties/ping.min.js
atome-0.5.6.3.6 vendor/assets/src/js/third_parties/ping.min.js
atome-0.5.6.3.5 vendor/assets/src/js/third_parties/ping.min.js
atome-0.5.6.3.1 vendor/assets/src/js/third_parties/ping.min.js
atome-0.5.6.3.0 vendor/assets/src/js/third_parties/ping.min.js
atome-0.5.6.2.9 vendor/assets/src/js/third_parties/ping.min.js
atome-0.5.6.2.7 vendor/assets/src/js/third_parties/ping.min.js
atome-0.5.6.2.5 vendor/assets/src/js/third_parties/ping.min.js
atome-0.5.6.2.4 vendor/assets/src/js/third_parties/ping.min.js
atome-0.5.6.2.3 vendor/assets/src/js/third_parties/ping.min.js
atome-0.5.6.2.1 vendor/assets/src/js/third_parties/ping.min.js