Skip to content

Commit

Permalink
Merge pull request #2633 from sreevidya-16/vidya
Browse files Browse the repository at this point in the history
Google Keep Extension
  • Loading branch information
Sulagna-Dutta-Roy authored Aug 9, 2024
2 parents 909b61c + 9005544 commit 0d8122e
Show file tree
Hide file tree
Showing 4 changed files with 87 additions and 0 deletions.
27 changes: 27 additions & 0 deletions Google Keep Extension/manifest.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
{
"manifest_version": 3,
"name": "Google Keep Extension",
"description": "A simple Chrome extension for Google Keep.",
"version": "1.0",
"permissions": [
"storage",
"activeTab"
],
"action": {
"default_popup": "popup.html",
"default_icon": {
"16": "icons/icon16.png",
"48": "icons/icon48.png",
"128": "icons/icon128.png"
}
},
"background": {
"service_worker": "background.js"
},
"icons": {
"16": "icons/icon16.png",
"48": "icons/icon48.png",
"128": "icons/icon128.png"
}
}

35 changes: 35 additions & 0 deletions Google Keep Extension/popup.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
body {
font-family: Arial, sans-serif;
padding: 10px;
background-color: #f5f5f5;
}

h1 {
font-size: 18px;
margin-bottom: 10px;
}

textarea {
width: 100%;
height: 100px;
margin-bottom: 10px;
padding: 5px;
font-size: 14px;
border-radius: 5px;
border: 1px solid #ccc;
}

button {
width: 100%;
padding: 10px;
font-size: 14px;
background-color: #4285F4;
color: white;
border: none;
border-radius: 5px;
cursor: pointer;
}

button:hover {
background-color: #357ae8;
}
15 changes: 15 additions & 0 deletions Google Keep Extension/popup.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Google Keep Extension</title>
<link rel="stylesheet" href="popup.css">
</head>
<body>
<h1>Google Keep Notes</h1>
<textarea id="noteText" placeholder="Write your note here..."></textarea>
<button id="saveButton">Save Note</button>
<script src="popup.js"></script>
</body>
</html>
10 changes: 10 additions & 0 deletions Google Keep Extension/popup.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
document.getElementById('saveButton').addEventListener('click', () => {
const noteText = document.getElementById('noteText').value;
if (noteText) {
chrome.storage.sync.set({ 'note': noteText }, () => {
alert('Note saved!');
});
} else {
alert('Please write something before saving.');
}
});

0 comments on commit 0d8122e

Please sign in to comment.