Skip to content

Commit efe0873

Browse files
committed
Added icon to manifest and bugfixes
1 parent ec83390 commit efe0873

File tree

3 files changed

+11
-10
lines changed

3 files changed

+11
-10
lines changed

icon48.png

2.15 KB
Loading

manifest.json

+5-2
Original file line numberDiff line numberDiff line change
@@ -3,13 +3,16 @@
33
"name": "Tab Notes",
44
"browser_specific_settings": {
55
"gecko": {
6-
"id": "tab-notes@nishit",
6+
"id": "tab-notes@ryux",
77
"strict_min_version": "42.0"
88
}
99
},
1010
"version": "0.1.0",
1111
"author": "Nishit",
12-
"description": "Allow you to write anything in new tab",
12+
"icons": {
13+
"48": "icon48.png"
14+
},
15+
"description": "Allow you to take notes in the new tab page",
1316
"permissions": ["storage"],
1417
"chrome_url_overrides": {
1518
"newtab": "newtab.html"

tabnotes.js

+6-8
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,6 @@ browser.tabs.onActivated.addListener(tabOpen);
55
browser.windows.onFocusChanged.addListener(tabOpen);
66

77
function logKey(e) {
8-
console.log("Textarea Change");
98
clearTimeout(timeoutId);
109
timeoutId = setTimeout(function() {
1110
// Runs 1 second (1000 ms) after the last change
@@ -20,14 +19,13 @@ function saveToDB() {
2019
}
2120

2221
function tabOpen(tab) {
23-
console.log("tab open");
2422
browser.storage.sync.get("tab_note").then(result => {
25-
console.log(result);
26-
document.querySelector("#notes").value = result.tab_note;
23+
if (typeof result !== "undefined") {
24+
document.querySelector("#notes").value = result.tab_note;
25+
}
2726
});
2827
}
2928

30-
31-
window.addEventListener('load', () => {
32-
tabOpen()
33-
})
29+
window.addEventListener("load", () => {
30+
tabOpen();
31+
});

0 commit comments

Comments
 (0)