diff --git a/Daily Devotionals Extension/manifest.json b/Daily Devotionals Extension/manifest.json new file mode 100644 index 00000000..23c7bfe3 --- /dev/null +++ b/Daily Devotionals Extension/manifest.json @@ -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" + } + } + \ No newline at end of file diff --git a/Daily Devotionals Extension/popup.css b/Daily Devotionals Extension/popup.css new file mode 100644 index 00000000..61e6c15b --- /dev/null +++ b/Daily Devotionals Extension/popup.css @@ -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; + } + \ No newline at end of file diff --git a/Daily Devotionals Extension/popup.html b/Daily Devotionals Extension/popup.html new file mode 100644 index 00000000..15df1948 --- /dev/null +++ b/Daily Devotionals Extension/popup.html @@ -0,0 +1,19 @@ + + + + + + Daily Devotionals + + + +
+

Daily Devotionals

+
+

Loading...

+
+ +
+ + + diff --git a/Daily Devotionals Extension/popup.js b/Daily Devotionals Extension/popup.js new file mode 100644 index 00000000..eefe25aa --- /dev/null +++ b/Daily Devotionals Extension/popup.js @@ -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 = `

${devotional}

`; + } + + refreshButton.addEventListener('click', fetchDevotional); + + // Fetch a devotional when the popup is opened + fetchDevotional(); + }); + \ No newline at end of file