split out JS to make it easier to lint

This commit is contained in:
Kai Hendry
2011-12-01 07:04:56 +01:00
parent efd326fa2f
commit 63c8d55770
2 changed files with 16 additions and 10 deletions

15
index.js Normal file
View File

@@ -0,0 +1,15 @@
function massage() {
humane.timeout = 5000;
humane("Please wait...");
humane("Still loading...");
}
function submitPressed() {
if (document.forms.f.checkValidity()) {
b = document.getElementById("b");
b.disabled = true;
massage();
document.forms.f.submit();
}
}

View File

@@ -6,16 +6,7 @@
<link id='theme' rel='stylesheet' href='themes/bigbox.css'/> <link id='theme' rel='stylesheet' href='themes/bigbox.css'/>
<link rel="stylesheet" type="text/css" href="style.css"> <link rel="stylesheet" type="text/css" href="style.css">
<script src="humane.min.js" async></script> <script src="humane.min.js" async></script>
<script> <script src="index.js"></script>
function submitPressed() {
if (document.forms.f.checkValidity()) {
b = document.getElementById("b");
b.disabled = true;
function() { humane.timeout= 5000; humane("Please wait..."); humane("Still loading..."); humane("Ah crap, sorry about this..."], ["I wish transfer chunked worked..."]); }
document.forms.f.submit();
}
}
</script>
</head> </head>
<body> <body>