Skip to content

Commit dce4b9a

Browse files
Merge pull request #8 from Nyanraltotlapun/master
Adding Import/Export functionality, fixes and improvements.
2 parents ca6670c + c4b2dfd commit dce4b9a

32 files changed

+975
-185
lines changed

notes.txt

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
Just development notes.
2+
3+
https://www.svgrepo.com/collection/pointers-2/
4+
5+
https://www.svgrepo.com/collection/hand-gestures-7/2
6+
7+
https://www.svgrepo.com/svg/474836/export
8+
9+
https://www.svgrepo.com/svg/474870/import
10+
11+
https://www.svgrepo.com/svg/277641/menu

src/extension/extButtonAction.js

Lines changed: 20 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,11 +7,28 @@ if (typeof browser === "undefined") {
77
var browser = chrome;
88
}
99

10+
var extension_tab_id = null;
11+
12+
function onCreated(tab) {
13+
extension_tab_id = tab.id;
14+
console.debug(`Created new tab: ${tab.id}`);
15+
}
16+
17+
function onError(error) {
18+
console.error(`Error: ${error}`);
19+
}
20+
1021
function openWindow() {
1122
console.log("injecting");
12-
browser.tabs.create({
13-
"url": "/window/window.html",
14-
});
23+
if (extension_tab_id) {
24+
browser.tabs.update(extension_tab_id, { active: true });
25+
}
26+
else {
27+
let creating = browser.tabs.create({
28+
"url": "/window/window.html",
29+
});
30+
creating.then(onCreated, onError);
31+
}
1532
}
1633

1734
browser.action.onClicked.addListener(openWindow);

src/extension/manifest_chrome.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"manifest_version": 3,
33
"name": "Time Tracker",
4-
"version": "1.2.2",
4+
"version": "1.3.0",
55

66
"author": "Anna Molodtsova and Kirill Shakirov",
77

src/extension/manifest_firefox.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"manifest_version": 3,
33
"name": "Time Tracker",
4-
"version": "1.2.2",
4+
"version": "1.3.0",
55

66
"author": "Anna Molodtsova and Kirill Shakirov",
77

Lines changed: 7 additions & 16 deletions
Loading
Lines changed: 5 additions & 0 deletions
Loading
Lines changed: 6 additions & 0 deletions
Loading
Lines changed: 23 additions & 0 deletions
Loading
Lines changed: 8 additions & 21 deletions
Loading
Lines changed: 7 additions & 20 deletions
Loading

0 commit comments

Comments
 (0)