diff --git a/Memory usage monitor/icons/icon128.png b/Memory usage monitor/icons/icon128.png new file mode 100644 index 00000000..066b3c70 Binary files /dev/null and b/Memory usage monitor/icons/icon128.png differ diff --git a/Memory usage monitor/icons/icon16.png b/Memory usage monitor/icons/icon16.png new file mode 100644 index 00000000..ca799bc3 Binary files /dev/null and b/Memory usage monitor/icons/icon16.png differ diff --git a/Memory usage monitor/icons/icon48.png b/Memory usage monitor/icons/icon48.png new file mode 100644 index 00000000..a8ff1bcf Binary files /dev/null and b/Memory usage monitor/icons/icon48.png differ diff --git a/Memory usage monitor/index.html b/Memory usage monitor/index.html new file mode 100644 index 00000000..51b992bb --- /dev/null +++ b/Memory usage monitor/index.html @@ -0,0 +1,29 @@ + + + + + + Memory Usage Monitor + + + +
+

Memory Usage Monitor

+
+
+ Total Memory: + Loading... +
+
+ Available Memory: + Loading... +
+
+ Used Memory: + Loading... +
+
+
+ + + diff --git a/Memory usage monitor/manifest.json b/Memory usage monitor/manifest.json new file mode 100644 index 00000000..5b935bff --- /dev/null +++ b/Memory usage monitor/manifest.json @@ -0,0 +1,18 @@ +{ + "manifest_version": 3, + "name": "Memory Usage Monitor", + "version": "1.0", + "description": "Monitor memory usage of your system", + "action": { + "default_popup": "index.html", + "default_icon": { + "16": "icons/icon16.png", + "48": "icons/icon48.png", + "128": "icons/icon128.png" + } + }, + "permissions": [ + "system.memory" + ] + } + \ No newline at end of file diff --git a/Memory usage monitor/script.js b/Memory usage monitor/script.js new file mode 100644 index 00000000..21039984 --- /dev/null +++ b/Memory usage monitor/script.js @@ -0,0 +1,22 @@ +document.addEventListener('DOMContentLoaded', () => { + const totalMemoryElement = document.getElementById('total-memory'); + const availableMemoryElement = document.getElementById('available-memory'); + const usedMemoryElement = document.getElementById('used-memory'); + + if (chrome.system && chrome.system.memory) { + chrome.system.memory.getInfo((info) => { + const totalMemory = (info.capacity / (1024 * 1024 * 1024)).toFixed(2); // Convert to GB + const availableMemory = (info.availableCapacity / (1024 * 1024 * 1024)).toFixed(2); // Convert to GB + const usedMemory = (totalMemory - availableMemory).toFixed(2); + + totalMemoryElement.textContent = `${totalMemory} GB`; + availableMemoryElement.textContent = `${availableMemory} GB`; + usedMemoryElement.textContent = `${usedMemory} GB`; + }); + } else { + totalMemoryElement.textContent = 'Not supported'; + availableMemoryElement.textContent = 'Not supported'; + usedMemoryElement.textContent = 'Not supported'; + } + }); + \ No newline at end of file diff --git a/Memory usage monitor/style.css b/Memory usage monitor/style.css new file mode 100644 index 00000000..51b11193 --- /dev/null +++ b/Memory usage monitor/style.css @@ -0,0 +1,45 @@ +body { + font-family: Arial, sans-serif; + margin: 0; + padding: 0; + display: flex; + justify-content: center; + align-items: center; + height: 100vh; + background-color: #f0f0f0; + } + + .container { + background: #fff; + padding: 20px; + border-radius: 8px; + box-shadow: 0 0 10px rgba(0, 0, 0, 0.1); + text-align: center; + } + + h1 { + margin-bottom: 20px; + font-size: 24px; + color: #333; + } + + .memory-info { + display: flex; + flex-direction: column; + align-items: center; + } + + .info-item { + margin-bottom: 10px; + font-size: 18px; + } + + .label { + font-weight: bold; + } + + .value { + margin-left: 10px; + color: #555; + } + \ No newline at end of file diff --git a/Popup Blocker/background.js b/Popup Blocker/background.js new file mode 100644 index 00000000..454f3517 --- /dev/null +++ b/Popup Blocker/background.js @@ -0,0 +1,31 @@ +let blocking = true; + +chrome.storage.local.get(['blocking'], function(result) { + blocking = result.blocking !== undefined ? result.blocking : true; +}); + +chrome.webRequest.onBeforeRequest.addListener( + function(details) { + if (blocking) { + chrome.notifications.create({ + type: 'basic', + iconUrl: 'icons/icon48.png', + title: 'Popup Blocker', + message: 'Popup blocked!' + }); + } + return { cancel: blocking }; + }, + { urls: ["*://*/*"], types: ["popup"] }, + ["blocking"] +); + +chrome.runtime.onMessage.addListener(function(request, sender, sendResponse) { + if (request.action === "toggleBlocking") { + blocking = request.blocking; + chrome.storage.local.set({ blocking: blocking }); + sendResponse({ blocking: blocking }); + } else if (request.action === "getBlockingStatus") { + sendResponse({ blocking: blocking }); + } +}); diff --git a/Popup Blocker/icons/icon128.png b/Popup Blocker/icons/icon128.png new file mode 100644 index 00000000..9deca9ab Binary files /dev/null and b/Popup Blocker/icons/icon128.png differ diff --git a/Popup Blocker/icons/icon16.png b/Popup Blocker/icons/icon16.png new file mode 100644 index 00000000..da082f82 Binary files /dev/null and b/Popup Blocker/icons/icon16.png differ diff --git a/Popup Blocker/icons/icon48.png b/Popup Blocker/icons/icon48.png new file mode 100644 index 00000000..17fd5339 Binary files /dev/null and b/Popup Blocker/icons/icon48.png differ diff --git a/Popup Blocker/manifest.json b/Popup Blocker/manifest.json new file mode 100644 index 00000000..e8b114ee --- /dev/null +++ b/Popup Blocker/manifest.json @@ -0,0 +1,31 @@ +{ + "manifest_version": 3, + "name": "Best Popup Blocker", + "version": "1.0", + "description": "A popup blocker extension with modern UI and animations", + "permissions": [ + "webRequest", + "webRequestBlocking", + "notifications", + "storage", + "https://*/*", + "http://*/*" + ], + "background": { + "service_worker": "background.js" + }, + "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/Popup Blocker/popup.css b/Popup Blocker/popup.css new file mode 100644 index 00000000..cf4a4dba --- /dev/null +++ b/Popup Blocker/popup.css @@ -0,0 +1,44 @@ +body { + font-family: Arial, sans-serif; + display: flex; + justify-content: center; + align-items: center; + height: 200px; + margin: 0; + background: #f0f0f0; + } + + #container { + text-align: center; + } + + h1 { + font-size: 1.5em; + margin-bottom: 10px; + } + + p { + margin: 0; + font-size: 1em; + color: #333; + } + + button { + padding: 10px 20px; + font-size: 1em; + cursor: pointer; + border: none; + background: #007bff; + color: white; + transition: background 0.3s ease; + } + + button:hover { + background: #0056b3; + } + + #status { + font-weight: bold; + color: green; + } + \ No newline at end of file diff --git a/Popup Blocker/popup.html b/Popup Blocker/popup.html new file mode 100644 index 00000000..15f0b265 --- /dev/null +++ b/Popup Blocker/popup.html @@ -0,0 +1,17 @@ + + + + + + Popup Blocker + + + +
+

Popup Blocker

+

Status: Active

+ +
+ + + diff --git a/Popup Blocker/popup.js b/Popup Blocker/popup.js new file mode 100644 index 00000000..f5f27546 --- /dev/null +++ b/Popup Blocker/popup.js @@ -0,0 +1,17 @@ +document.getElementById('toggle').addEventListener('click', function() { + chrome.runtime.sendMessage({ action: "toggleBlocking", blocking: !blocking }, function(response) { + updateStatus(response.blocking); + }); + }); + + document.addEventListener('DOMContentLoaded', function() { + chrome.runtime.sendMessage({ action: "getBlockingStatus" }, function(response) { + updateStatus(response.blocking); + }); + }); + + function updateStatus(blocking) { + document.getElementById('status').textContent = blocking ? 'Active' : 'Inactive'; + document.getElementById('status').style.color = blocking ? 'green' : 'red'; + } + \ No newline at end of file