Skip to content

Commit 84c31f8

Browse files
committed
sync with server improvements
1 parent 2dde616 commit 84c31f8

4 files changed

Lines changed: 14 additions & 12 deletions

File tree

public/js/stats_counter.js

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,9 +10,10 @@
1010
document.getElementById('stat_loadavg').innerHTML = data.load;
1111
});
1212
if (window.location.href.indexOf('stats') !== -1) {
13+
socket.emit('stats');
1314
setInterval(function() {
14-
socket.emit('stats')
15-
}, 250);
15+
socket.emit('stats');
16+
}, 1000);
1617
}
1718
});
1819
})();

views/pages/documentation.ejs

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,8 @@
2929
</ul>
3030
</section>
3131

32+
<% include ../snippets/ads %>
33+
3234
<section id="intro">
3335
<h2>Introduction</h2>
3436
<p>In August 2013, we set out with a goal to create a free and easy to use service to generate random user data for application testing.</p>
@@ -113,7 +115,7 @@ $.ajax({
113115
</pre>
114116
</section>
115117

116-
<section id="multiple">
118+
<section id="multiple">
117119
<h2>Requesting Multiple Users</h2>
118120
<p>Random User Generator allows you to fetch up to 5,000 generated users in one request using the <b>results</b> parameter.</p>
119121
<pre>
@@ -275,7 +277,6 @@ https://randomuser.me/api/?results=5&<span>callback=randomuserdata</span>
275277
</ul>
276278
<p>If you find a mistake with an API or would like to contribute to our database, feel free to visit our <a href="https://github.com/RandomAPI/Randomuser.me-Data">Github Repo</a>. We'd really appreciate it :)</p>
277279
</section>
278-
<% include ../snippets/ads %>
279280
</div>
280281
<% include ../snippets/footer %>
281282
<% include ../snippets/analytics %>

views/pages/index.ejs

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -46,6 +46,13 @@
4646
</ul>
4747
</div>
4848

49+
<section class="sponsor">
50+
<h2>Sponsored</h2>
51+
<h3>RandomAPI</h3>
52+
<p>Want to create your own customized data generator for your application?<br>Check out our other service RandomAPI!</p>
53+
<button id="learnmore" class="button" onClick="window.open('https://randomapi.com');">Learn More</button>
54+
</section>
55+
4956
<% include ../snippets/ads %>
5057

5158
<section>
@@ -62,13 +69,6 @@ $.ajax({
6269
</pre>
6370
</section>
6471

65-
<section class="sponsor">
66-
<h2>Sponsored</h2>
67-
<h3>RandomAPI</h3>
68-
<p>Want to create your own customized data generator for your application?<br>Check out our other service RandomAPI!</p>
69-
<button id="learnmore" class="button" onClick="window.open('https://randomapi.com');">Learn More</button>
70-
</section>
71-
7272
<section>
7373
<h2>Results</h2>
7474
<p>The application will provide you with a JSON, XML, CSV, or YAML object that you can parse and apply to your application.</p>

views/pages/stats.ejs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
<% include ../snippets/header %>
22

33
<body class="stats">
4-
<server hidden><%=socket%></server>
4+
<server hidden></server>
55

66
<% include ../snippets/nav %>
77

0 commit comments

Comments
 (0)