-
Notifications
You must be signed in to change notification settings - Fork 179
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
fe2181a
commit bcf2d58
Showing
4 changed files
with
100 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
{ | ||
"manifest_version": 3, | ||
"name": "Daily Devotionals", | ||
"version": "1.0", | ||
"description": "A Chrome extension that displays daily devotionals.", | ||
"permissions": [], | ||
"action": { | ||
"default_popup": "popup.html", | ||
"default_icon": { | ||
"16": "icons/icon16.png", | ||
"48": "icons/icon48.png", | ||
"128": "icons/icon128.png" | ||
} | ||
}, | ||
"icons": { | ||
"16": "icons/icon16.png", | ||
"48": "icons/icon48.png", | ||
"128": "icons/icon128.png" | ||
} | ||
} | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
body { | ||
font-family: Arial, sans-serif; | ||
margin: 0; | ||
padding: 10px; | ||
width: 300px; | ||
} | ||
|
||
.container { | ||
text-align: center; | ||
} | ||
|
||
h1 { | ||
font-size: 24px; | ||
margin-bottom: 20px; | ||
} | ||
|
||
#devotional { | ||
background-color: #f9f9f9; | ||
padding: 15px; | ||
border: 1px solid #ddd; | ||
border-radius: 5px; | ||
margin-bottom: 15px; | ||
} | ||
|
||
button { | ||
background-color: #007bff; | ||
color: white; | ||
border: none; | ||
padding: 10px 20px; | ||
border-radius: 5px; | ||
cursor: pointer; | ||
} | ||
|
||
button:hover { | ||
background-color: #0056b3; | ||
} | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
<!DOCTYPE html> | ||
<html lang="en"> | ||
<head> | ||
<meta charset="UTF-8"> | ||
<meta name="viewport" content="width=device-width, initial-scale=1.0"> | ||
<title>Daily Devotionals</title> | ||
<link rel="stylesheet" href="popup.css"> | ||
</head> | ||
<body> | ||
<div class="container"> | ||
<h1>Daily Devotionals</h1> | ||
<div id="devotional"> | ||
<p>Loading...</p> | ||
</div> | ||
<button id="refresh">Refresh</button> | ||
</div> | ||
<script src="popup.js"></script> | ||
</body> | ||
</html> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
document.addEventListener('DOMContentLoaded', function() { | ||
const devotionalElement = document.getElementById('devotional'); | ||
const refreshButton = document.getElementById('refresh'); | ||
|
||
function fetchDevotional() { | ||
// Simulate fetching a daily devotional | ||
const devotionals = [ | ||
"Start your day with a grateful heart.", | ||
"God's love never fails.", | ||
"You are blessed beyond measure.", | ||
"Faith can move mountains.", | ||
"Be strong and courageous." | ||
]; | ||
const devotional = devotionals[Math.floor(Math.random() * devotionals.length)]; | ||
devotionalElement.innerHTML = `<p>${devotional}</p>`; | ||
} | ||
|
||
refreshButton.addEventListener('click', fetchDevotional); | ||
|
||
// Fetch a devotional when the popup is opened | ||
fetchDevotional(); | ||
}); | ||
|