-
Notifications
You must be signed in to change notification settings - Fork 183
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'Sulagna-Dutta-Roy:master' into mj-patch1
- Loading branch information
Showing
40 changed files
with
731 additions
and
0 deletions.
There are no files selected for viewing
File renamed without changes.
File renamed without changes.
File renamed without changes.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
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,29 @@ | ||
<!DOCTYPE html> | ||
<html lang="en"> | ||
<head> | ||
<meta charset="UTF-8"> | ||
<meta name="viewport" content="width=device-width, initial-scale=1.0"> | ||
<title>Memory Usage Monitor</title> | ||
<link rel="stylesheet" href="style.css"> | ||
</head> | ||
<body> | ||
<div class="container"> | ||
<h1>Memory Usage Monitor</h1> | ||
<div class="memory-info"> | ||
<div class="info-item"> | ||
<span class="label">Total Memory:</span> | ||
<span class="value" id="total-memory">Loading...</span> | ||
</div> | ||
<div class="info-item"> | ||
<span class="label">Available Memory:</span> | ||
<span class="value" id="available-memory">Loading...</span> | ||
</div> | ||
<div class="info-item"> | ||
<span class="label">Used Memory:</span> | ||
<span class="value" id="used-memory">Loading...</span> | ||
</div> | ||
</div> | ||
</div> | ||
<script src="script.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,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" | ||
] | ||
} | ||
|
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,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'; | ||
} | ||
}); | ||
|
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,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; | ||
} | ||
|
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,14 @@ | ||
{ | ||
"manifest_version": 2, | ||
"name": "Noisli Clone", | ||
"version": "1.0", | ||
"description": "A clone of Noisli with gradient backgrounds and sound mixing.", | ||
"browser_action": { | ||
"default_popup": "popup.html", | ||
"default_icon": "icon.png" | ||
}, | ||
"permissions": [ | ||
"storage" | ||
] | ||
} | ||
|
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,43 @@ | ||
body { | ||
margin: 0; | ||
font-family: Arial, sans-serif; | ||
height: 300px; | ||
display: flex; | ||
justify-content: center; | ||
align-items: center; | ||
background: linear-gradient(to right, #ff7e5f, #feb47b); | ||
} | ||
|
||
.container { | ||
text-align: center; | ||
color: white; | ||
} | ||
|
||
h1 { | ||
margin-bottom: 20px; | ||
font-size: 24px; | ||
} | ||
|
||
.sounds { | ||
display: flex; | ||
flex-direction: column; | ||
} | ||
|
||
.sound-btn { | ||
background: rgba(255, 255, 255, 0.3); | ||
border: none; | ||
color: white; | ||
padding: 15px; | ||
margin: 5px; | ||
border-radius: 5px; | ||
cursor: pointer; | ||
transition: background 0.3s ease; | ||
} | ||
|
||
.sound-btn:hover { | ||
background: rgba(255, 255, 255, 0.5); | ||
} | ||
|
||
.sound-btn:active { | ||
background: rgba(255, 255, 255, 0.7); | ||
} |
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 @@ | ||
<!DOCTYPE html> | ||
<html lang="en"> | ||
<head> | ||
<meta charset="UTF-8"> | ||
<meta name="viewport" content="width=device-width, initial-scale=1.0"> | ||
<title>Noisli Clone</title> | ||
<link rel="stylesheet" href="popup.css"> | ||
</head> | ||
<body> | ||
<div class="container"> | ||
<h1>Noisli Clone</h1> | ||
<div class="sounds"> | ||
<button class="sound-btn" data-sound="rain">Rain</button> | ||
<button class="sound-btn" data-sound="forest">Forest</button> | ||
<button class="sound-btn" data-sound="waves">Waves</button> | ||
<button class="sound-btn" data-sound="fire">Fire</button> | ||
</div> | ||
</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,16 @@ | ||
document.addEventListener('DOMContentLoaded', () => { | ||
const soundButtons = document.querySelectorAll('.sound-btn'); | ||
|
||
soundButtons.forEach(button => { | ||
button.addEventListener('click', () => { | ||
const sound = button.getAttribute('data-sound'); | ||
playSound(sound); | ||
}); | ||
}); | ||
|
||
function playSound(sound) { | ||
const audio = new Audio(`sounds/${sound}.mp3`); | ||
audio.loop = true; | ||
audio.play(); | ||
} | ||
}); |
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,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 }); | ||
} | ||
}); |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
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,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" | ||
} | ||
} | ||
|
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,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; | ||
} | ||
|
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,17 @@ | ||
<!DOCTYPE html> | ||
<html lang="en"> | ||
<head> | ||
<meta charset="UTF-8"> | ||
<meta name="viewport" content="width=device-width, initial-scale=1.0"> | ||
<title>Popup Blocker</title> | ||
<link rel="stylesheet" href="popup.css"> | ||
</head> | ||
<body> | ||
<div id="container"> | ||
<h1>Popup Blocker</h1> | ||
<p>Status: <span id="status">Active</span></p> | ||
<button id="toggle">Toggle Blocking</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,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'; | ||
} | ||
|
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,7 @@ | ||
chrome.action.onClicked.addListener((tab) => { | ||
chrome.scripting.executeScript({ | ||
target: { tabId: tab.id }, | ||
files: ['content.js'] | ||
}); | ||
}); | ||
|
Oops, something went wrong.