mirror of
https://github.com/thewesker/greptweet.git
synced 2025-12-22 13:01:06 -05:00
disable button on submit
This commit is contained in:
@@ -4,6 +4,12 @@
|
|||||||
<meta charset="utf-8" />
|
<meta charset="utf-8" />
|
||||||
<title>GrepTweet</title>
|
<title>GrepTweet</title>
|
||||||
<link rel="stylesheet" type="text/css" href="style.css">
|
<link rel="stylesheet" type="text/css" href="style.css">
|
||||||
|
<script>
|
||||||
|
document.onunload = disableSubmit;
|
||||||
|
function disableSubmit() {
|
||||||
|
document.getElementById("button").disabled = true;
|
||||||
|
}
|
||||||
|
</script>
|
||||||
</head>
|
</head>
|
||||||
|
|
||||||
<body>
|
<body>
|
||||||
@@ -13,7 +19,7 @@
|
|||||||
<legend>Create or update a backup of your tweets, so you can grep them</legend>
|
<legend>Create or update a backup of your tweets, so you can grep them</legend>
|
||||||
<p><label>Twitter username: <input type="text" name="id" required placeholder="kaihendry"></label></p>
|
<p><label>Twitter username: <input type="text" name="id" required placeholder="kaihendry"></label></p>
|
||||||
<p><input type="checkbox" name="o" />Try get older tweets, instead of newer tweets when updating</p>
|
<p><input type="checkbox" name="o" />Try get older tweets, instead of newer tweets when updating</p>
|
||||||
<input type="submit" value="Fetch tweets"/>
|
<input id="button" type="submit" value="Fetch tweets"/>
|
||||||
</fieldset>
|
</fieldset>
|
||||||
</form>
|
</form>
|
||||||
|
|
||||||
|
|||||||
4
main.js
4
main.js
@@ -2,7 +2,7 @@ function grep(query) {
|
|||||||
|
|
||||||
$.getJSON("/u/" + NAME + "/grep.php?q=" + query + "&jsoncallback=?", function(data) {
|
$.getJSON("/u/" + NAME + "/grep.php?q=" + query + "&jsoncallback=?", function(data) {
|
||||||
var results = "<p>Searched for: " + query + "</p><ol>";
|
var results = "<p>Searched for: " + query + "</p><ol>";
|
||||||
for (i in data) {
|
for (var i in data) {
|
||||||
tweet = data[i].split('|');
|
tweet = data[i].split('|');
|
||||||
if (tweet.length > 2) {
|
if (tweet.length > 2) {
|
||||||
results += "<li><a href=\"http://twitter.com/" + NAME + "/status/" + tweet[0] + "\">" + tweet.slice(2) + "</a></li>"; // With datetime
|
results += "<li><a href=\"http://twitter.com/" + NAME + "/status/" + tweet[0] + "\">" + tweet.slice(2) + "</a></li>"; // With datetime
|
||||||
@@ -33,7 +33,7 @@ $(document).ready(function() {
|
|||||||
|
|
||||||
$("input[type=text]").focus();
|
$("input[type=text]").focus();
|
||||||
|
|
||||||
$("#source").html("<a href=\"" + NAME + "\.txt\">" + NAME + " simple text backup file</a>");
|
$("#source").html('<a href="' + NAME + '.txt">' + NAME + ' simple text backup file</a>');
|
||||||
|
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|||||||
@@ -6,11 +6,17 @@ footer {
|
|||||||
font-size: small; margin: 2em;
|
font-size: small; margin: 2em;
|
||||||
}
|
}
|
||||||
|
|
||||||
input {
|
input[type=text] {
|
||||||
font-size: 2em;
|
font-size: 2em;
|
||||||
border:1px solid #A78B53;
|
border:1px solid #A78B53;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
input[type=submit] {
|
||||||
|
font-size: 3em;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
.twtr-widget { float: right; }
|
.twtr-widget { float: right; }
|
||||||
|
|
||||||
#users li { display: inline; }
|
#users li { display: inline; }
|
||||||
|
|||||||
Reference in New Issue
Block a user