Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <script type="text/javascript">
- var mobile = (/iphone|ipad|ipod|android|blackberry|mini|windows\sce|palm/i.test(navigator.userAgent.toLowerCase()));
- if (!mobile) {
- jQuery.getJSON("mon/online.json", {}, function(json){
- for (var item in json) {
- jQuery("mon").append("<div id='mon'><div class='progress-bar' id='onlinebar_" + item + "'><b><dfg>" + item + "</dfg></b><span style='min-width: 10%;width: 10%;max-width: 75%;'><b id='onlinebarin_" + item + "'><center>" + json[item].players + "</center></b></span> </div>");
- }
- });
- setInterval(function() {
- jQuery.getJSON("mon/online.json", {}, function(json){
- for (var item in json) {
- if (json[item].status == 1 && json[item].maxplayers >= 1) {
- jQuery('#onlinebar_' + item).children('span').animate({width: json[item].players + '%' }, 500 );
- jQuery('#onlinebar_' + item).css('background-image','url(http://world4play.com/public/style_images/nacht/online.png)');
- jQuery('#onlinebarin_' + item).html('');
- jQuery('#onlinebarin_' + item).append('<center>' + json[item].players + '</center>');
- }
- if (json[item].status == 0) {
- jQuery('#onlinebar_' + item).children('span').animate({width: '100%' }, 500 );
- jQuery('#onlinebar_' + item).css('background-image','url(http://world4play.com/public/style_images/nacht/offline.png)');
- jQuery('#onlinebarin_' + item).html('');
- jQuery('#onlinebarin_' + item).append('<center>Отключен</center>');
- }
- if (json[item].status == 1 && json[item].maxplayers == 0) {
- jQuery('#onlinebar_' + item).children('span').animate({width: '100%' }, 500 );
- jQuery('#onlinebar_' + item).css('background-image','url(http://world4play.com/public/style_images/nacht/work.png)');
- jQuery('#onlinebarin_' + item).html('');
- jQuery('#onlinebarin_' + item).append('<center>Профилактика</center>');
- }
- }
- });
- }, 2500);
- }
- </script>
- <mon></mon>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement