SHARE
    TWEET
    Krenair

    Azelphur servers server-info.js halloween code

    Oct 31st, 2013
    192
    0
    Never
    Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
    1. if(!(this.status == "0" || this.status == "1") || !(this.id > 0)) {return false;}
    2. if($('#server-info-block-'+this.id).length) {
    3. var block = $('#server-info-block-'+this.id);
    4. if(block.find('.server-info-status img').attr('src').match(/offline/)){var WasOffline = true;}else{var WasOffline = false;}
    5. if((WasOffline && this.status == "1") || (!WasOffline && this.status == "0")){var StatusChange = true;}else{var StatusChange = false;}
    6. if(block.find('.server-info-status').length){if(StatusChange){if(this.status == "0") {block.find('.server-info-status img.online').hide();block.find('.server-info-status img.offline').show()} else {block.find('.server-info-status img.offline').hide();block.find('.server-info-status img.online').show()}}}
    7. if(block.find('.server-info-name').length){var GetElement = block.find('.server-info-name a');if(StatusChange || GetElement.text() != this.title || (this.status == "1" && !GetElement.attr('href').match(this.host))){if(this.status == "0") {GetElement.attr('href', '#').attr('title', 'Server offline').text(this.title);} else {GetElement.attr('href', 'steam://connect/'+this.host+':'+this.port).attr('title', 'Connect to this server').text(this.title);}}}
    8. if(block.find('.server-info-map').length) {var GetElement = block.find('.server-info-map');if(this.status == "0"){this.current_map = "N/A";}if(this.current_map != GetElement.html()){GetElement.html(this.current_map);}}
    9. if(block.find('.server-info-players').length){var GetElement = block.find('.server-info-players');if(this.status == "0"){this.numplayers = "0";this.maxplayers = "0";}if(this.numplayers+"/"+this.maxplayers != GetElement.html()){GetElement.html(this.numplayers+"/"+this.maxplayers);}}
    10. }
    Advertisement
    Add Comment
    Please, Sign In to add comment
    Public Pastes
    We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
    Not a member of Pastebin yet?
    Sign Up, it unlocks many cool features!

    AltStyle によって変換されたページ (->オリジナル) /