vericudebuget commited on
Commit
25a6736
·
verified ·
1 Parent(s): 4b456c3

Delete work

Browse files
work/background.js DELETED
@@ -1,11 +0,0 @@
1
- chrome.runtime.onInstalled.addListener(() => {
2
- chrome.storage.sync.set({ blockedSites: [] });
3
- });
4
-
5
- chrome.webRequest.onBeforeRequest.addListener(
6
- (details) => {
7
- return { cancel: true };
8
- },
9
- { urls: ["*://*.example.com/*"], types: ["script"] },
10
- ["blocking"]
11
- );
 
 
 
 
 
 
 
 
 
 
 
 
work/brainly.crx DELETED
Binary file (8.48 kB)
 
work/brainly.pem DELETED
@@ -1,28 +0,0 @@
1
- -----BEGIN PRIVATE KEY-----
2
- MIIEvQIBADANBgkqhkiG9w0BAQEFAASCBKcwggSjAgEAAoIBAQCjG4MmKn4D6DRH
3
- RtCQNZ7vmETLjMDSIhBbP8G1Jmrjhm5Vq9hy0+fZSQcc3PgN/JFCkTkeVSIxiskp
4
- MYKLEc9BfBzwT4e0zVLfxER+QyDepKZ2HMD59CzuEm6mdPwts5XAF2PKQuAUPloB
5
- IWHUMZQiUZdX2j8e1TCKkjGobki/VjDfmJakjkeDhF7vNdUvBvxnV5e1KaKXY84G
6
- Nl/tpj/aMMCaJSHoQfgDGFdhQ6BXaZmKRekG/CYXrZosgfdjB7lf1rYP8W6kepyZ
7
- wB4RIAIMkER9aDhehTOAyLrSonk7FkiFsOFBbTGdKY3udhVvTeFW8WXCOVML15gH
8
- lL7D+eKPAgMBAAECggEAQxny8vUhQZc6RqZ18BX3LGeOydS+kNRNuVR56v4ClFb+
9
- NkWLtvXBmK0H/ZJUhGCHHAUlo/pvJkWL62QAahkqFC0stJprYHDl6sPST8VrFN1U
10
- 1BuRMmOHRmwT1GwlQOH0NgIJXjD0AbADFBr5JbQ91n6NjilttVAMd72cK0gvqnLx
11
- P6n0Mgvai2Eiv4RHgJA1TvuBVbkWwxkBjCZbVd+CZ7bDxv2TRBK3n7IecZQ8aTbS
12
- 18H9xvVCStJvWfNoF8biQYt1PM6NBD4MB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 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
work/brainly/background.js DELETED
@@ -1,28 +0,0 @@
1
- chrome.runtime.onInstalled.addListener(() => {
2
- chrome.storage.sync.set({ blockedSites: [] });
3
- updateDeclarativeNetRequestRules();
4
- });
5
-
6
- chrome.storage.onChanged.addListener((changes, namespace) => {
7
- if (namespace === 'sync' && changes.blockedSites) {
8
- updateDeclarativeNetRequestRules();
9
- }
10
- });
11
-
12
- async function updateDeclarativeNetRequestRules() {
13
- const { blockedSites } = await chrome.storage.sync.get('blockedSites');
14
- const rules = blockedSites.map((site, index) => ({
15
- id: index + 1,
16
- priority: 1,
17
- action: { type: 'block' },
18
- condition: {
19
- urlFilter: `||${site}^`,
20
- resourceTypes: ['script']
21
- }
22
- }));
23
-
24
- await chrome.declarativeNetRequest.updateDynamicRules({
25
- removeRuleIds: rules.map(rule => rule.id),
26
- addRules: rules
27
- });
28
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
work/brainly/icons/64.png DELETED
Binary file (964 Bytes)
 
work/brainly/icons/icon128.png DELETED
Binary file (2.43 kB)
 
work/brainly/icons/icon16.png DELETED
Binary file (1.03 kB)
 
work/brainly/icons/icon48.png DELETED
Binary file (964 Bytes)
 
work/brainly/manifest.json DELETED
@@ -1,29 +0,0 @@
1
- {
2
- "manifest_version": 3,
3
- "name": "JavaScript Disabler",
4
- "version": "1.0",
5
- "description": "Disables JavaScript on specified websites and their subdomains.",
6
- "permissions": [
7
- "storage",
8
- "declarativeNetRequest"
9
- ],
10
- "host_permissions": [
11
- "<all_urls>"
12
- ],
13
- "background": {
14
- "service_worker": "background.js"
15
- },
16
- "action": {
17
- "default_popup": "popup.html",
18
- "default_icon": {
19
- "16": "icons/icon16.png",
20
- "48": "icons/icon48.png",
21
- "128": "icons/icon128.png"
22
- }
23
- },
24
- "icons": {
25
- "16": "icons/icon16.png",
26
- "48": "icons/icon48.png",
27
- "128": "icons/icon128.png"
28
- }
29
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
work/brainly/popup.html DELETED
@@ -1,20 +0,0 @@
1
- <!DOCTYPE html>
2
- <html>
3
- <head>
4
- <title>JavaScript Disabler</title>
5
- <style>
6
- body { width: 300px; padding: 10px; }
7
- ul { list-style-type: none; padding: 0; }
8
- li { margin-bottom: 5px; }
9
- button { margin-left: 5px; }
10
- </style>
11
- </head>
12
- <body>
13
- <h1>JavaScript Disabler</h1>
14
- <input type="text" id="site" placeholder="Enter domain (e.g., example.com)">
15
- <button id="addSite">Add Site</button>
16
- <h2>Blocked Sites:</h2>
17
- <ul id="siteList"></ul>
18
- <script src="popup.js"></script>
19
- </body>
20
- </html>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
work/brainly/popup.js DELETED
@@ -1,41 +0,0 @@
1
- document.getElementById('addSite').addEventListener('click', addSite);
2
-
3
- function addSite() {
4
- const site = document.getElementById('site').value.trim();
5
- if (site) {
6
- chrome.storage.sync.get('blockedSites', (data) => {
7
- const blockedSites = new Set(data.blockedSites || []);
8
- blockedSites.add(site);
9
- chrome.storage.sync.set({ blockedSites: Array.from(blockedSites) }, () => {
10
- updateSiteList();
11
- document.getElementById('site').value = '';
12
- });
13
- });
14
- }
15
- }
16
-
17
- function removeSite(site) {
18
- chrome.storage.sync.get('blockedSites', (data) => {
19
- const blockedSites = new Set(data.blockedSites || []);
20
- blockedSites.delete(site);
21
- chrome.storage.sync.set({ blockedSites: Array.from(blockedSites) }, updateSiteList);
22
- });
23
- }
24
-
25
- function updateSiteList() {
26
- chrome.storage.sync.get('blockedSites', (data) => {
27
- const siteList = document.getElementById('siteList');
28
- siteList.innerHTML = '';
29
- (data.blockedSites || []).forEach((site) => {
30
- const li = document.createElement('li');
31
- li.textContent = site;
32
- const removeButton = document.createElement('button');
33
- removeButton.textContent = 'Remove';
34
- removeButton.onclick = () => removeSite(site);
35
- li.appendChild(removeButton);
36
- siteList.appendChild(li);
37
- });
38
- });
39
- }
40
-
41
- updateSiteList();
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
work/ok DELETED
File without changes
work/popup.html DELETED
@@ -1,13 +0,0 @@
1
- <!DOCTYPE html>
2
- <html>
3
- <head>
4
- <title>JavaScript Disabler</title>
5
- <script src="popup.js"></script>
6
- </head>
7
- <body>
8
- <h1>JavaScript Disabler</h1>
9
- <input type="text" id="site" placeholder="Enter site URL">
10
- <button id="addSite">Add Site</button>
11
- <ul id="siteList"></ul>
12
- </body>
13
- </html>