Skip to content

Commit

Permalink
πŸ”€ Merge pull request #3 from HiBixby/develop
Browse files Browse the repository at this point in the history
πŸ”– V0.1.0
  • Loading branch information
HiBixby authored Jan 24, 2023
2 parents 6def909 + 908c538 commit ade1579
Show file tree
Hide file tree
Showing 21 changed files with 270 additions and 94 deletions.
25 changes: 25 additions & 0 deletions docs/background.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
console.log("background.js loaded!");

chrome.alarms.onAlarm.addListener((alarm) => {
console.log("Alarm!!!");
const id = alarm.name;
chrome.storage.local.get(["todos"]).then((result) => {
for (index in result.todos) {
if (id === result.todos[index].id.toString()) {
const message = result.todos[index].title;
chrome.notifications.create(id.toString(), {
type: "basic",
iconUrl: "logo.png",
title: "웨, 일해",
message: message ? message : "🐳제λͺ© μ—†μŒπŸ³",
priority: 2,
});
if (result.todos[index].link !== null) {
chrome.tabs.create({
url: result.todos[index].link,
});
}
}
}
});
});
1 change: 1 addition & 0 deletions docs/css/app.14708914.css

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 0 additions & 1 deletion docs/css/app.56f205ac.css

This file was deleted.

2 changes: 1 addition & 1 deletion docs/index.html
Original file line number Diff line number Diff line change
@@ -1 +1 @@
<!doctype html><html lang=""><head><meta charset="utf-8"/><meta http-equiv="X-UA-Compatible" content="IE=edge"/><meta name="viewport" content="width=device-width,initial-scale=1"/><link rel="icon" href="favicon.ico"/><link rel="stylesheet" as="style" crossorigin href="https://cdn.jsdelivr.net/gh/orioncactus/pretendard@v1.3.6/dist/web/variable/pretendardvariable-dynamic-subset.css"/><link rel="stylesheet" href="main.css"/><title>whale-hae</title><script defer="defer" src="js/chunk-vendors.90ac33e3.js"></script><script defer="defer" src="js/app.347522dc.js"></script><link href="css/app.56f205ac.css" rel="stylesheet"></head><body><noscript><strong>We're sorry but whale-hae doesn't work properly without JavaScript enabled. Please enable it to continue.</strong></noscript><div id="app"><div class="logo-container"><img src="logo.svg" class="logo__img"/><div class="logo__text">웨, 일해</div></div></div></body></html>
<!doctype html><html lang=""><head><meta charset="utf-8"/><meta http-equiv="X-UA-Compatible" content="IE=edge"/><meta name="viewport" content="width=device-width,initial-scale=1"/><link rel="icon" href="logo.png"/><link rel="stylesheet" as="style" crossorigin href="https://cdn.jsdelivr.net/gh/orioncactus/pretendard@v1.3.6/dist/web/variable/pretendardvariable-dynamic-subset.css"/><link rel="stylesheet" href="main.css"/><title>웨, 일해</title><script defer="defer" src="js/chunk-vendors.71e5b51b.js"></script><script defer="defer" src="js/app.d1f8ce35.js"></script><link href="css/app.14708914.css" rel="stylesheet"></head><body><noscript><strong>We're sorry but whale-hae doesn't work properly without JavaScript enabled. Please enable it to continue.</strong></noscript><div id="app"><div class="logo-container"><img src="logo.svg" class="logo__img"/><div class="logo__text">웨, 일해</div></div></div></body></html>
2 changes: 0 additions & 2 deletions docs/js/app.347522dc.js

This file was deleted.

1 change: 0 additions & 1 deletion docs/js/app.347522dc.js.map

This file was deleted.

2 changes: 2 additions & 0 deletions docs/js/app.d1f8ce35.js

Large diffs are not rendered by default.

1 change: 1 addition & 0 deletions docs/js/app.d1f8ce35.js.map

Large diffs are not rendered by default.

Large diffs are not rendered by default.

1 change: 1 addition & 0 deletions docs/js/chunk-vendors.71e5b51b.js.map

Large diffs are not rendered by default.

1 change: 0 additions & 1 deletion docs/js/chunk-vendors.90ac33e3.js.map

This file was deleted.

14 changes: 7 additions & 7 deletions docs/manifest.json
Original file line number Diff line number Diff line change
@@ -1,8 +1,7 @@

{
"manifest_version": 3,
"name": "웨,일해(Do whale)",
"description": "일정 관리 및 μž‘μ—… μžλ™ μ‹€ν–‰",
"name": "웨,일해(Whale Hae)",
"description": "μ›¨μΌλŒ€ν•™ 1νŒ€ - 일정 관리 및 링크 μžλ™ μ‹€ν–‰",
"version": "0.1.0",
"sidebar_action": {
"default_page": "index.html",
Expand All @@ -12,7 +11,7 @@
"48": "logo.png",
"128": "logo.png"
},
"default_title":"웨,일해",
"default_title": "웨,일해",
"use_navigation_bar": false
},
"icons": {
Expand All @@ -21,13 +20,14 @@
"48": "logo.png",
"128": "logo.png"
},
"permissions":[
"permissions": [
"unlimitedStorage",
"storage",
"tabs",
"notifications",
"alarms"
],
"background":{
"service_worker":"background.js"
"background": {
"service_worker": "background.js"
}
}
25 changes: 25 additions & 0 deletions public/background.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
console.log("background.js loaded!");

chrome.alarms.onAlarm.addListener((alarm) => {
console.log("Alarm!!!");
const id = alarm.name;
chrome.storage.local.get(["todos"]).then((result) => {
for (index in result.todos) {
if (id === result.todos[index].id.toString()) {
const message = result.todos[index].title;
chrome.notifications.create(id.toString(), {
type: "basic",
iconUrl: "logo.png",
title: "웨, 일해",
message: message ? message : "🐳제λͺ© μ—†μŒπŸ³",
priority: 2,
});
if (result.todos[index].link !== null) {
chrome.tabs.create({
url: result.todos[index].link,
});
}
}
}
});
});
Loading

0 comments on commit ade1579

Please sign in to comment.