Skip to content

Commit

Permalink
housekeeping
Browse files Browse the repository at this point in the history
  • Loading branch information
semanticdata committed Jan 7, 2024
1 parent deb56cd commit 8b2806a
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 9 deletions.
6 changes: 3 additions & 3 deletions manifest.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
"strict_min_version": "60.0"
}
},
"version": "0.1.1",
"version": "0.1.3",
"author": "semanticdata",
"icons": {
"48": "icon48.png"
Expand All @@ -17,12 +17,12 @@
"storage"
],
"chrome_url_overrides": {
"newtab": "new-tab.html"
"newtab": "newtab.html"
},
"browser_action": {
"browser_style": true,
"default_title": "New Tab Notes",
"default_popup": "new-tab.html"
"default_popup": "newtab.html"
},
"commands": {
"_execute_browser_action": {
Expand Down
6 changes: 3 additions & 3 deletions new-tab.html → newtab.html
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
<meta http-equiv="X-UA-Compatible" content="ie=edge" />
<title>New Tab</title>
<link rel="icon" type="image/png" sizes="48x48" href="icon48.png">
<script type="text/javascript" src="./newtabnotes.js"></script>
<script type="text/javascript" src="./tabnotes.js"></script>
<!-- <link rel="stylesheet" href="https://fonts.googleapis.com/css?family=Bitter:400,700&display=swap" /> -->
</head>

Expand All @@ -18,7 +18,7 @@
background: rebeccapurple;
}

#new-tab-notes {
#notes {
box-sizing: border-box;
border: 0;
font-size: 18px;
Expand All @@ -37,7 +37,7 @@

<body>
<main>
<textarea id="new-tab-notes" placeholder="Start writing..."></textarea>
<textarea id="notes" placeholder="Start writing."></textarea>
</main>
</body>

Expand Down
6 changes: 3 additions & 3 deletions newtabnotes.js → tabnotes.js
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ function getBrowser() {

function saveToDB() {
data = {
tab_note: document.querySelector("#new-tab-notes").value
tab_note: document.querySelector("#notes").value
};
if (browser_type === "Chrome") {
chrome.storage.sync.set(data, function() {});
Expand All @@ -46,13 +46,13 @@ function tabOpen(tab) {
if (browser_type === "Chrome") {
chrome.storage.sync.get(["tab_note"], function(result) {
if (typeof result.tab_note !== "undefined") {
document.querySelector("#new-tab-notes").value = result.tab_note;
document.querySelector("#notes").value = result.tab_note;
}
});
} else {
browser_obj.storage.sync.get(["tab_note"]).then(result => {
if (typeof result.tab_note !== "undefined") {
document.querySelector("#new-tab-notes").value = result.tab_note;
document.querySelector("#notes").value = result.tab_note;
}
});
}
Expand Down

0 comments on commit 8b2806a

Please sign in to comment.