-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathoptions.html
More file actions
31 lines (29 loc) · 798 Bytes
/
options.html
File metadata and controls
31 lines (29 loc) · 798 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
<html>
<head>
<title>Basecamp Browser Shortcut</title>
</head>
<script type="text/javascript">
function get_input(){
var input = document.getElementById("input");
var input_value = input.value;
localStorage["basecamp_next_url"] = input_value;
var status = document.getElementById("status");
status.innerHTML = "Options Saved.";
setTimeout(function() {
status.innerHTML = "";
}, 750);
}
function restore_options() {
var basecamp_url = localStorage["basecamp_next_url"];
var select = document.getElementById("input");
select.value = basecamp_url;
}
</script>
<body onload="restore_options()">
<form>
https://<input type="text" name="nombre" id="input"/>.basecamp.com
<button onclick="get_input()">Save</button>
</form>
<div id="status"></div>
</body>
</html>