Skip to content

Commit f803467

Browse files
committed
Updated to make storage.get work, and the options page prettier (still not good enough, but meh)
1 parent 7758a3f commit f803467

File tree

3 files changed

+28
-4
lines changed

3 files changed

+28
-4
lines changed

manifest.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
"manifest_version": 2,
44
"name": "__MSG_extensionName__",
55
"description": "__MSG_extensionDescription__",
6-
"version": "1.2",
6+
"version": "1.2.1",
77
"default_locale": "en",
88
"applications": {
99
"gecko": {

options.html

Lines changed: 23 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,13 +3,35 @@
33
<html>
44
<head>
55
<meta charset="utf-8">
6+
<style>
7+
button {
8+
background-color: green;
9+
border: 1px solid black;
10+
border-radius: 5px;
11+
color: white;
12+
display: block;
13+
line-height: 180%;
14+
margin-top: 5px;
15+
}
16+
label {
17+
display: block;
18+
font-weight: bold;
19+
vertical-align: top;
20+
}
21+
textarea {
22+
height: 20vw;
23+
margin-top: 5px;
24+
padding: 3px;
25+
width: 80vw;
26+
}
27+
</style>
628
</head>
729

830
<body>
931
<p>You must have access to any repositories you specify here in order for these options to work. Enter the name path to repos in Markdown ([name](url)), using semicolons to separate multiple options.</p>
1032
<form>
1133
<label>GitHub Repository options</label>
12-
<input type="text" id="repostring" />
34+
<textarea id="repostring"></textarea>
1335
<button type="submit">Save</button>
1436
<input id="currentstring" type="hidden" value="" />
1537
</form>

options.js

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,8 +15,10 @@ function saveOptions(e) {
1515
function restoreOptions() {
1616
var storageItem = browser.storage.local.get('repos');
1717
storageItem.then((res) => {
18-
document.querySelector("#currentstring").innerText = res.repos;
19-
document.querySelector("#repostring").innerText = res.repos;
18+
if (res.repos != undefined) {
19+
document.querySelector("#currentstring").setAttribute("value", res.repos);
20+
document.querySelector("#repostring").innerText = res.repos;
21+
}
2022
});
2123
}
2224

0 commit comments

Comments
 (0)