forked from helloandre/url-shortener-chrome-extension
-
Notifications
You must be signed in to change notification settings - Fork 0
/
options.html
executable file
·55 lines (50 loc) · 1.03 KB
/
options.html
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
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
<html>
<head>
<title>
CoinURL Shortener Options
</title>
<style>
body {
color: #999;
}
#content {
width: 300px;
margin: 0 auto;
padding: 30px;
}
</style>
<script>
function saveOptions(){
var uuid = document.getElementById('uuid').value;
var status = document.getElementById('status');
if (uuid != ""){
localStorage['uuid'] = uuid;
// let them know it's ok
status.innerHTML = "Options Saved";
showuuid();
}
else {
status.innerHTML = "Error - Incorrect Uuid";
}
// make the ok go away
setTimeout(function() {
status.innerHTML = "";
}, 2000);
}
function showuuid(){
document.getElementById("old-uuid").innerHTML = localStorage['uuid'];
}
</script>
</head>
<body onload="showuuid()">
<div id='content'>
Uuid:<span id='old-uuid'></span>
<br><br>
New Uuid: <input type='text' size=30 id='uuid'/>
<br><br>
<button value='Save Options' onclick='saveOptions()'>Save Options</button>
<br><br>
<div id='status'>
</div>
</div>
</body>