Permalink
Switch branches/tags
Nothing to show
Find file
Fetching contributors…
Cannot retrieve contributors at this time
56 lines (41 sloc) 1.4 KB
<html>
<head><title>Options</title>
<link href="stylesheet.css" media="screen" rel="stylesheet" type="text/css" />
<script src="http://ajax.googleapis.com/ajax/libs/jquery/1.6.0/jquery.min.js" type="text/javascript"></script>
<script type="text/javascript">
function save_options() {
localStorage["show_badge"] = $('#show_badge').is(':checked');
localStorage["show_notification"] = $('#show_notification').is(':checked');
localStorage["calendar_url"] = $('#calendar_url').val();
// Update status to let user know options were saved.
$("#status").html("Options Saved.");
setTimeout(function() {
$("#status").html("");
}, 4000);
}
function restore_options() {
$('#show_badge').attr('checked', (localStorage["show_badge"] === "true"));
$('#show_notification').attr('checked', (localStorage["show_notification"] === "true"));
$('#calendar_url').val(localStorage["calendar_url"]);
}
</script>
</head>
<body onload="restore_options()">
<div id='status'></div>
<h1 class='title'>
Options
</h1>
<div>
Calendar URL: <input type="text" id="calendar_url" style='width:300px' />
</div>
<div>
<input type="checkbox" id="show_badge" value="true" /> Show Current Streak
</div>
<div>
<input type="checkbox" id="show_notification" value="false" /> Show Reminder Desktop Notification
</div>
<div>
<button onclick="save_options()">Save</button>
</div>
</body>
</html>