Advertisement
Guest User

haxball

a guest
Dec 24th, 2011
1,134
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 9.43 KB | None | 0 0
  1. <!DOCTYPE html>
  2. <html lang="en">
  3. <head>
  4.     <meta http-equiv="X-UA-Compatible" content="chrome=1"/>
  5.     <title>HaxBall - Play</title>
  6.     <meta charset="utf-8" />
  7.     <meta http-equiv="imagetoolbar" content="no"/>
  8.     <meta name="description" content="Play HaxBall, the real-time multiplayer online browser game."/>
  9.     <meta name="keywords" content="haxball,multiplayer,game,football,air-hockey,soccer"/>
  10.     <link rel="shortcut icon" href="http://www.haxball.com/favicon.png" />
  11.     <link rel="stylesheet" href="http://www.haxball.com/css/style.css" type="text/css" />
  12.  
  13.     <!--[if IE 6]><link rel="stylesheet" href="css/ie6.css" type="text/css" /><![endif]-->
  14.     <link href='http://fonts.googleapis.com/css?family=Nobile' rel='stylesheet' type='text/css'>
  15.     <link href='http://fonts.googleapis.com/css?family=Droid+Sans:bold' rel='stylesheet' type='text/css'>
  16.     <script type="text/javascript">
  17.         if (top != self) top.location = location;
  18.     </script>
  19.     <script type="text/javascript">
  20.         var _gaq = _gaq || [];
  21.         _gaq.push(['_setAccount', 'UA-20268031-1']);
  22.         _gaq.push(['_setDomainName', 'none']);
  23.         _gaq.push(['_setAllowLinker', true]);
  24.         _gaq.push(['_trackPageview']);
  25.        
  26.         (function() {
  27.             var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true;
  28.             ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js';
  29.             var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s);
  30.         })();
  31.     </script>
  32.     <script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/prototype/1.7.0.0/prototype.js"></script>
  33.     <script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/swfobject/2.2/swfobject.js"></script>
  34.  
  35.     <script src="http://www.google.com/jsapi?key=ABQIAAAAfF6r1k8NoYtii3F5iGnjDBSDJHkI3yb3J9tkXihv4eAxxOVDsxQ7q3DNRMk0r8fUAixkrHz188choQ" type="text/javascript"></script>
  36.     <script type="text/javascript">
  37.         Cookie = {
  38.             write: function(name, value, days) {
  39.                 if (days) {
  40.                     var date = new Date();
  41.                     date.setTime(date.getTime() + (days*24*60*60*1000));
  42.                     var expires = "; expires=" + date.toGMTString();
  43.                 }
  44.                 else var expires = "";
  45.                 document.cookie = name + "=" + value + expires + "; path=/";
  46.             },
  47.  
  48.             read: function(name) {
  49.                 var nameEQ = name + "=";
  50.                 var ca = document.cookie.split(';');
  51.                 for (var i = 0; i < ca.length; i++) {
  52.                     var c = ca[i];
  53.                     while (c.charAt(0) == ' ') c = c.substring(1, c.length);
  54.                     if (c.indexOf(nameEQ) == 0) return c.substring(nameEQ.length, c.length);
  55.                 }
  56.                 return null;
  57.             },
  58.  
  59.             erase: function(name) {
  60.                 this.write(name, "", -1);
  61.             }
  62.         };
  63.  
  64.         HaxBall = {
  65.             showNotice: function(id) {
  66.                 Element.addClassName(document.body, 'show_notice');
  67.                 $(id).addClassName('open');
  68.             },
  69.  
  70.             hideNotice: function() {
  71.                 Element.removeClassName(document.body, 'show_notice');
  72.                 $$('.notice').invoke('removeClassName', 'open');
  73.             },
  74.  
  75.             initGpuNoticeTimeout: function() {
  76.                 if (this.replayMode) return;
  77.                 if (!this.wmodeDirect()) return;
  78.                 this.gpuNoticeTimeout = setTimeout((function() {
  79.                     this.showNotice('gpu_notice');
  80.                 }).bind(this), 5000);
  81.             },
  82.  
  83.             gameWorking: function() {
  84.                 if (this.gpuNoticeTimeout) clearTimeout(this.gpuNoticeTimeout);
  85.                 this.hideNotice();
  86.             },
  87.  
  88.             wmodeDirect: function() {
  89.                 var queryParam = swfobject.getQueryParamValue('gpu');
  90.                 if (queryParam == 'off') {
  91.                     this.disableWmodeDirect();
  92.                     Event.observe(window, 'load', (function() {
  93.                         this.showNotice('gpu_disabled_notice');
  94.                     }).bind(this));
  95.                     return false;
  96.                 } else if (queryParam == 'on') {
  97.                     this.enableWmodeDirect();
  98.                     return true;
  99.                 } else if (Cookie.read('gpu') == 'off') {
  100.                     return false;
  101.                 } else {
  102.                     return true;
  103.                 }
  104.             },
  105.  
  106.             enableWmodeDirect: function() {
  107.                 Cookie.erase('gpu');
  108.             },
  109.  
  110.             disableWmodeDirect: function() {
  111.                 Cookie.write('gpu', 'off', 365);
  112.             },
  113.  
  114.             embed: function() {
  115.                 var swfName = 'haxball.swf', replayVersion = swfobject.getQueryParamValue('replay');
  116.  
  117.                 var flashvars = {
  118.                     token: 'hax'
  119.                 };
  120.  
  121.                 var params = {
  122.                     bgcolor: "#939e7f",
  123.                     allowScriptAccess: 'always'
  124.                 };
  125.                
  126.                 var attributes = {
  127.                         id: 'haxball'
  128.                 };
  129.  
  130.                 if (this.wmodeDirect()) {
  131.                     params.wmode = 'direct';
  132.                     flashvars.wmode_direct = 'yes';
  133.                 }
  134.                
  135.                 if ( replayVersion.match(/^\d+$/) ) {
  136.                     swfName = 'replay/' + replayVersion + '.swf';
  137.                     if (location.hash.match(/^#.+/)) {
  138.                         flashvars.replayurl = location.hash.substr(1);
  139.                     }
  140.                     this.replayMode = true;
  141.                 } else if (swfobject.getQueryParamValue('roomid')) {
  142.                     flashvars.roomid = swfobject.getQueryParamValue('roomid');
  143.                     if (swfobject.getQueryParamValue('pass')) flashvars.pass = swfobject.getQueryParamValue('pass');
  144.                 }
  145.  
  146.                 swfobject.embedSWF(swfName, "no_flash", "100%", "99%", "10.0.0", "expressInstall.swf", flashvars, params, attributes);
  147.             }
  148.         };
  149.  
  150.         HaxBall.embed();
  151.     </script>
  152.     <!-- dfp -->
  153.     <script type='text/javascript' src='http://partner.googleadservices.com/gampad/google_service.js'>
  154.     </script>
  155.     <script type='text/javascript'>
  156.         GS_googleAddAdSenseService("ca-pub-8620987890162221");
  157.         GS_googleEnableAllServices();
  158.     </script>
  159.     <script type='text/javascript'>
  160.         GA_googleAddSlot("ca-pub-8620987890162221", "HaxBall_Main_Right_160x600");
  161.     </script>
  162.  
  163.     <script type='text/javascript'>
  164.         GA_googleFetchAds();
  165.     </script>
  166.     <!-- end dfp -->
  167. </head>
  168. <body id="play">
  169.     <div id="header">
  170.         <ul id="navigation">
  171.             <li class="active"><a href="http://www.haxball.com/index.html">Play HaxBall</a></li>
  172.             <li><a href="http://blog.haxball.com">News</a></li>
  173.  
  174.             <li><a href="http://www.haxball.com/about.html">About</a></li>
  175.             <li><a href="http://www.haxball.com/faq.html">FAQ</a></li>
  176.             <li><a href="http://www.haxball.com/community.html">Community</a></li>
  177.         </ul>
  178.        
  179.         <div id="donate">
  180.             <form action="http://10.0.2.15/cgi-bin/webscr" method="post">
  181.                 <input type="hidden" name="cmd" value="_s-xclick">
  182.  
  183.                 <input type="hidden" name="hosted_button_id" value="QQ4WAA755U5ZY">
  184.                 <input type="image" src="https://www.paypal.com/en_US/i/btn/btn_donate_LG.gif" border="0" name="submit" alt="PayPal - The safer, easier way to pay online!">
  185.                 <img alt="" border="0" src="https://www.paypal.com/en_US/i/scr/pixel.gif" width="1" height="1">
  186.             </form>
  187.         </div>
  188.  
  189.         <div id="social_bookmarking_buttons">
  190.             <!-- Stumble -->
  191.             <span id="stumble_badge" class="button">
  192.  
  193.                 <script src="http://www.stumbleupon.com/hostedbadge.php?s=1"></script>
  194.             </span>
  195.  
  196.             <!-- Tweet -->
  197.             <span id="tweet_button" class="button">
  198.                 <a href="http://twitter.com/share" class="twitter-share-button" data-url="http://www.haxball.com" data-text="Play HaxBall!" data-count="horizontal">Tweet</a><script type="text/javascript" src="http://platform.twitter.com/widgets.js"></script>
  199.             </span>
  200.  
  201.             <!-- Facebook Like -->
  202.             <span id="facebook_like" class="button">
  203.                 <iframe src="http://www.facebook.com/plugins/like.php?href=http%3A%2F%2Ffacebook.com%2Fpages%2FHaxBall%2F161384490573730&amp;layout=button_count&amp;show_faces=false&amp;width=100&amp;action=like&amp;colorscheme=light&amp;height=21" scrolling="no" frameborder="0" style="border:none; overflow:hidden; width:100px; height:21px;" allowTransparency="true"></iframe>
  204.             </span>
  205.         </div>
  206.     </div>
  207.    
  208.     <div id="ads">
  209.         <!--
  210.         <script type="text/javascript">
  211.             google_ad_client = "ca-pub-8620987890162221";
  212.             /* HaxBall Main */
  213.             google_ad_slot = "2466297762";
  214.             google_ad_width = 160;
  215.             google_ad_height = 600;
  216.         </script>
  217.         <script type="text/javascript" src="http://pagead2.googlesyndication.com/pagead/show_ads.js"></script>
  218.         -->
  219.  
  220.         <!-- HaxBall_Main_Right_160x600 -->
  221.         <script type='text/javascript'>
  222.             GA_googleFillSlot("HaxBall_Main_Right_160x600");
  223.         </script>
  224.     </div>
  225.  
  226.     <div id="gpu_notice" class="notice">
  227.         If you see a blank screen where the game should be just <a href="http://www.haxball.com/?gpu=off">click here to disable hardware acceleration</a>.
  228.     </div>
  229.  
  230.     <div id="gpu_disabled_notice" class="notice">
  231.  
  232.         You have disabled hardware acceleration for HaxBall. If you did it by accident <a href="http://www.haxball.com/?gpu=on">click here to enable it back again</a> or <a href="index.html#" onclick="HaxBall.hideNotice(); return false;">close this notice</a>.
  233.     </div>
  234.  
  235.     <div id="the_game" class="settings">
  236.         <div id="no_flash">
  237.             <div id="sad_face">:(</div>
  238.  
  239.             <h2>Sorry, but you need Adobe Flash Player to play HaxBall</h2>
  240.  
  241.             <p>You need to install Adobe Flash Player version 10 (or greater).</p>
  242.  
  243.             <p>Fortunately you can click on this little button below to install it for free.</p>
  244.  
  245.             <p>
  246.                 <a href="http://www.adobe.com/go/getflashplayer">
  247.                     <img src="http://www.adobe.com/images/shared/download_buttons/get_flash_player.gif" alt="Get Adobe Flash player" />
  248.  
  249.                 </a>
  250.             </p>
  251.  
  252.             <p>If you have Flash Player 10 installed and you're still seeing this message make sure you have JavaScript enabled.</p>
  253.         </div>
  254.     </div>
  255.     <script type="text/javascript">
  256.         (function() {
  257.             var r;
  258.             window.onbeforeunload = function(e) {
  259.                 if (r = $('haxball').onUnload()) {
  260.                     return (e || window.event).returnValue = 'You are the host of this match, are you sure you wanna close it?';
  261.                 }
  262.             };
  263.             window.onunload = function() {
  264.                 r && new Ajax.Request(r, {postBody: ":0", asynchronous: false});
  265.             };
  266.         })();
  267.  
  268.         HaxBall.initGpuNoticeTimeout();
  269.     </script>
  270. </body>
  271. </html>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement