| 
									
										
										
										
											2020-05-22 11:12:07 +00:00
										 |  |  | <!DOCTYPE html> | 
					
						
							|  |  |  | <html> | 
					
						
							|  |  |  |     <head> | 
					
						
							|  |  |  |         <title>shapez.io</title> | 
					
						
							|  |  |  |         <script type="text/javascript"> | 
					
						
							|  |  |  |             function postToGameFrame(msg) { | 
					
						
							|  |  |  |                 var handle = document.getElementById("gameframe"); | 
					
						
							|  |  |  |                 if (handle) { | 
					
						
							|  |  |  |                     handle.contentWindow.postMessage(msg, "*"); | 
					
						
							|  |  |  |                 } | 
					
						
							|  |  |  |             } | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |             window.addEventListener("message", function (event) { | 
					
						
							|  |  |  |                 if (event.data === "shapezio://gd.game_loaded") { | 
					
						
							|  |  |  |                     console.log("Game loaded"); | 
					
						
							|  |  |  |                 } | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |                 if (event.data === "shapezio://gd.show_ad") { | 
					
						
							|  |  |  |                     console.log("Got ad message"); | 
					
						
							|  |  |  |                     gdsdk.showAd(); | 
					
						
							|  |  |  |                 } | 
					
						
							|  |  |  |             }); | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |             window["GD_OPTIONS"] = { | 
					
						
							|  |  |  |                 gameId: "ac8e6fc04a6f46f990ac6a317bb4d74e", | 
					
						
							|  |  |  |                 onEvent: function (event) { | 
					
						
							|  |  |  |                     switch (event.name) { | 
					
						
							|  |  |  |                         case "SDK_GAME_START": | 
					
						
							|  |  |  |                             console.log("GDSDK: ad finished"); | 
					
						
							|  |  |  |                             postToGameFrame("shapezio://gd.ad_finished"); | 
					
						
							|  |  |  |                             setTimeout(function () { | 
					
						
							|  |  |  |                                 document.getElementById("gameframe").focus(); | 
					
						
							|  |  |  |                                 console.log("(GD-PARENT_FRAME) successfully focused frame"); | 
					
						
							|  |  |  |                             }, 500); | 
					
						
							|  |  |  |                             break; | 
					
						
							|  |  |  |                         case "SDK_GAME_PAUSE": | 
					
						
							|  |  |  |                             // pause game logic / mute audio | 
					
						
							|  |  |  |                             console.log("GDSDK: ad started"); | 
					
						
							|  |  |  |                             postToGameFrame("shapezio://gd.ad_started"); | 
					
						
							|  |  |  |                             break; | 
					
						
							|  |  |  |                     } | 
					
						
							|  |  |  |                 }, | 
					
						
							|  |  |  |             }; | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |             (function (d, s, id) { | 
					
						
							|  |  |  |                 var js, | 
					
						
							|  |  |  |                     fjs = d.getElementsByTagName(s)[0]; | 
					
						
							|  |  |  |                 if (d.getElementById(id)) return; | 
					
						
							|  |  |  |                 js = d.createElement(s); | 
					
						
							|  |  |  |                 js.id = id; | 
					
						
							|  |  |  |                 js.src = "https://html5.api.gamedistribution.com/main.min.js"; | 
					
						
							|  |  |  |                 fjs.parentNode.insertBefore(js, fjs); | 
					
						
							|  |  |  |             })(document, "script", "gamedistribution-jssdk"); | 
					
						
							|  |  |  |         </script> | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |         <style> | 
					
						
							|  |  |  |             body { | 
					
						
							|  |  |  |                 background: #222428; | 
					
						
							|  |  |  |                 text-align: center; | 
					
						
							|  |  |  |                 font-family: Arial; | 
					
						
							|  |  |  |                 color: #eee; | 
					
						
							|  |  |  |             } | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |             #gameframe { | 
					
						
							|  |  |  |                 position: fixed; | 
					
						
							|  |  |  |                 top: 0; | 
					
						
							|  |  |  |                 left: 0; | 
					
						
							|  |  |  |                 width: 100%; | 
					
						
							|  |  |  |                 height: 100%; | 
					
						
							|  |  |  |                 border: 0; | 
					
						
							|  |  |  |                 display: block; | 
					
						
							|  |  |  |                 z-index: 1; | 
					
						
							|  |  |  |             } | 
					
						
							|  |  |  |         </style> | 
					
						
							|  |  |  |     </head> | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |     <body style="background: #333;"> | 
					
						
							|  |  |  |         <iframe | 
					
						
							|  |  |  |             onclick="this.focus()" | 
					
						
							| 
									
										
										
										
											2020-05-22 11:16:42 +00:00
										 |  |  |             src="https://shapez.io?embed=gamedistribution" | 
					
						
							| 
									
										
										
										
											2020-05-22 11:12:07 +00:00
										 |  |  |             id="gameframe" | 
					
						
							|  |  |  |             allowfullscreen | 
					
						
							|  |  |  |         ></iframe> | 
					
						
							|  |  |  |     </body> | 
					
						
							|  |  |  | </html> |