<style>
@-o-viewport {
width: device-width;
zoom: 1;
user-zoom: fixed;
}
@font-face {
/* LCD font by Samuel Reynolds */
/* License: http://www.spinwardstars.com/scrfonts/aaastdlicense.html */
font-family: 'LCD';
src: url('http://media.shinydemos.com/inbox-attack/fonts/lcd.eot') format('embedded-opentype'),
url('http://media.shinydemos.com/inbox-attack/fonts/lcd.woff') format('woff'),
url('http://media.shinydemos.com/inbox-attack/fonts/lcd.ttf') format('truetype'),
url('http://media.shinydemos.com/inbox-attack/fonts/lcd.svg#LCD') format('svg');
}
#txt_time, #txt_score, #txt_result {
font-family: 'LCD', monospace;
}
</style>
<script type="text/javascript"><![CDATA[
function launch() {
/*
* Configurable options
*/
var TOTAL_TIME = 20; // Total time (progress countdown) in seconds
var DROP_TIME = 300; // Final mail drop time - lower is more difficult
/*
* Non-configurable stuff from here on
*/
// Cache global variables for speed
var win = window;
var doc = document;
// Resize game to fit screen
var default_width = 980;
var default_height = 630;
var case_ratio = default_width / default_height; // Optimal size ratio is roughly 1.55:1
var svg = doc.getElementsByTagName('svg')[0];
var screen_width = win.innerWidth;
var screen_height = win.innerHeight;
var case_width, case_height;
// Ensure game is in landscape format
var screen_ratio = screen_width / screen_height;
if (case_ratio > screen_ratio) {
case_width = screen_width;
case_height = case_width / case_ratio;
} else {
case_width = screen_width;
...
CSS
HTML, BODY {
height:100%;
}
BODY {
margin:0;
padding:0;
}
.inbox {
position:absolute;
top:0;
right:0;
bottom:0;
left:0;
Please Whitelist JSFiddle in your content blocker.
Help keep JSFiddle free for always by one of two ways:
Whitelist JSFiddle in your content blocker (two clicks)
Go PRO and get access to additional PRO features →
Join the 4+ million users, and keep the JSFiddle dream alive.
Ad-free
All ads in the editor and listing pages are turned completely off.
Use pre-released features
You get to try and use features (like the Palette Color Generator) months before everyone else.
Fiddle collections
Sort and categorize your Fiddles into multiple collections.
Private collections and fiddles
You can make as many Private Fiddles, and Private Collections as you wish!
Console
Debug your Fiddle with a minimal built-in JavaScript console.