Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

New server URL

  • Loading branch information...
commit df45271c233f20d94db537e51af1f22a5483c7b2 1 parent 7c1c691
@luisivan luisivan authored
Showing with 4 additions and 4 deletions.
  1. +2 −2 example.html
  2. +1 −1  holaio.js
  3. +1 −1  holaio.min.js
View
4 example.html
@@ -7,7 +7,7 @@
<body>
<textarea id="code" style="width:1000px; height:300px;">Waiting...</textarea>
<ul id="links"></ul>
-<script src="holaio.js"></script>
+<script src="holaio.min.js"></script>
<script>
show = function(err, json) {
code = JSON.stringify (json);
@@ -22,7 +22,7 @@
}
window.onload = function() {
- var holaio = new HolaIO("YOURAPIKEY");
+ var holaio = new HolaIO("yourapikey");
holaio.get("google.com", "a span", true, false, show);
}
</script>
View
2  holaio.js
@@ -2,7 +2,7 @@
HolaIO = function(key) {
this.key = key;
- this.serverurl = "https://api.io.holalabs.com/";
+ this.serverurl = "https://api.holalabs.com/io/";
this.doRequest = function(url, callback) {
var xhr = new XMLHttpRequest();
if ("withCredentials" in xhr) {
View
2  holaio.min.js
@@ -1 +1 @@
-HolaIO=function(a){this.key=a;this.serverurl="https://api.io.holalabs.com/";this.doRequest=function(b,d){var c=new XMLHttpRequest();if("withCredentials" in c){c.open("GET",b,true)}else{if(typeof XDomainRequest!="undefined"){c=new XDomainRequest();c.open("GET",b)}else{c=null;d(418,null)}}c.setRequestHeader("X-Api-Key",this.key);c.setRequestHeader("X-Api-Version","1.0.0");c.onload=function(){d(c.status,JSON.parse(c.responseText))};c.onerror=function(){d(418,null)};c.send(null)};this.decodeHtmlEntities=function(b){return String(b).replace(/&amp;/ig,"&").replace(/&lt;/ig,"<").replace(/&gt;/ig,">").replace(/&quot;/ig,'"')};this.get=function(f,b,e,d,i){f=encodeURIComponent(f);b=encodeURIComponent(escape(this.decodeHtmlEntities(b)));var c=this.serverurl+f+"/"+b+"/"+e;if(d==true){var h=sessionStorage.getItem(c);if("undefined"!==typeof h&&h!==null){i(null,JSON.parse(h));return}else{var g=i;i=function(k,j){if(k<300){sessionStorage.setItem(c,JSON.stringify(j))}g(k,j);return}}}this.doRequest(c,i)}};
+HolaIO=function(a){this.key=a;this.serverurl="https://api.holalabs.com/io/";this.doRequest=function(b,d){var c=new XMLHttpRequest();if("withCredentials" in c){c.open("GET",b,true)}else{if(typeof XDomainRequest!="undefined"){c=new XDomainRequest();c.open("GET",b)}else{c=null;d(418,null)}}c.setRequestHeader("X-Api-Key",this.key);c.setRequestHeader("X-Api-Version","1.0.0");c.onload=function(){d(c.status,JSON.parse(c.responseText))};c.onerror=function(){d(418,null)};c.send(null)};this.decodeHtmlEntities=function(b){return String(b).replace(/&amp;/ig,"&").replace(/&lt;/ig,"<").replace(/&gt;/ig,">").replace(/&quot;/ig,'"')};this.get=function(f,b,e,d,i){f=encodeURIComponent(f);b=encodeURIComponent(escape(this.decodeHtmlEntities(b)));var c=this.serverurl+f+"/"+b+"/"+e;if(d==true){var h=sessionStorage.getItem(c);if("undefined"!==typeof h&&h!==null){i(null,JSON.parse(h));return}else{var g=i;i=function(k,j){if(k<300){sessionStorage.setItem(c,JSON.stringify(j))}g(k,j);return}}}this.doRequest(c,i)}};
Please sign in to comment.
Something went wrong with that request. Please try again.