From 1e3cd4e99657bd15b74092cdbf4e55f51f31489f Mon Sep 17 00:00:00 2001 From: Meet Jain Date: Wed, 7 Aug 2024 00:00:34 +0530 Subject: [PATCH 1/5] Feat: Added Memory usage monitor --- Memory usage monitor/icons/icon128.png | Bin 0 -> 1679 bytes Memory usage monitor/icons/icon16.png | Bin 0 -> 2925 bytes Memory usage monitor/icons/icon48.png | Bin 0 -> 4210 bytes Memory usage monitor/index.html | 29 ++++++++++++++++ Memory usage monitor/manifest.json | 18 ++++++++++ Memory usage monitor/script.js | 22 ++++++++++++ Memory usage monitor/style.css | 45 +++++++++++++++++++++++++ 7 files changed, 114 insertions(+) create mode 100644 Memory usage monitor/icons/icon128.png create mode 100644 Memory usage monitor/icons/icon16.png create mode 100644 Memory usage monitor/icons/icon48.png create mode 100644 Memory usage monitor/index.html create mode 100644 Memory usage monitor/manifest.json create mode 100644 Memory usage monitor/script.js create mode 100644 Memory usage monitor/style.css diff --git a/Memory usage monitor/icons/icon128.png b/Memory usage monitor/icons/icon128.png new file mode 100644 index 0000000000000000000000000000000000000000..066b3c70823213f8ee8726db13faf6f0c9e669ec GIT binary patch literal 1679 zcma)-|2NZ%AIF`;{cvr&rF-jq8`TFVk%PZdx=MB*{(bdq< zfM9$){C9o+i*z)1=hq3}`Rv+|-|0Y4wOWlrp**~Ny)nLMk5d@Tsa>|Ww~St#|FFL|(u9O1B^%L~#tyC(NNF?Uv%{=WEdu4pNYe7U^wjVtP8LDdV|FQTJASl#K^j84B94-YJhXLUgCGZb?U8@NZEPjAmb>lz8x}lPFaMF2aW!J(fAm{_ z67Rm8G-{;JZFdocomfI7%%%I~js%K)E*}B>9FV=dJ<}Xw()02+`it3Z$(P&*(6zzH z>!_i!<@CVRoua3mCE9#4RRxl$;7;P1wZ_tideeIAApc)V@Z!gFb$IIe_ZZ9OnW*0kG8ZPow1@q4@ zekZ%g?Id}NNS5h9O9&dq1Xz*48q@ecE7Ovt`?GB|GMnCQCo{0@nWokm61t>ic+S;y z0)MS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kLwrhf^trO8$r z>cx}Q_zs#Q!3+SvJ`cw3-9X*RpF!9Ptk}`vYDY~o=@|5ic zr>J0{J4U0lTf>f&V}=VTHMo)q9RFn}HABolx83r$e6|q@c`A_qp^vgC zyhO--q!OG$>@W!_#0>ibgW|<9+06GLL`&Pal6N)7hf#qya|%j{5>)W+iorm$AnxvI z&yBeWyOjH}*1sW2lE1#Zw-A2FjB0Fc5Pt&PzBgV`pZ)&-{>SqlB$%w1YbQ+u7yZ=# QJZ6Bov9(c+0rug)0bNsli2wiq literal 0 HcmV?d00001 diff --git a/Memory usage monitor/icons/icon48.png b/Memory usage monitor/icons/icon48.png new file mode 100644 index 0000000000000000000000000000000000000000..a8ff1bcf37607ad85bf00fdfb526ee022440114b GIT binary patch literal 4210 zcmai2S2!CA1Eofr*p#MfH?^w72sIL|o!YY%#ck|Wd)K%q5>$;#tg2lRs}!|MC^c#m zF{@U@s&#Ar{a^mq|9sy$=jA+{$MYSuk%2Z7kQ+!vMa6{B(J=YrGk>^wgXWKV&j6sOZ3dF(fJ~9uyP;gTWp>dIW($UcGwN z+S)ogI=a5TZe(O+ZEX#OLOnb@j*gC`q@)%X7iVT>EG#TyVq!EjG%_{B5`)Qn8~&TE$R4O zZT6M(E88ZzLh1Ru;DrU?zi$Npsr&zNes%52(#2i%k|L8&&3JU` zA>f`MdlJ8ixd<3NO0&eg{IW6Xxv*#M+NY^G(Yf~BlWUT4=;3YfS41J&aN6q)NKNj^ z6|Ju@E9xa%H>04mWbkxPo>pu4g~XDdwLnKAr%c8uQ&>z0gdl9guGR!LiSS14Rc8tq zMjn*>lm`4JSak2kEWPK(vDl5}(R7LhEvZVewbI>G4pfm0ef{>X7C)|2n0-Kq6Jx1= zY7U`~&_sfHvmib_6j`%X6-D&q0x8+{T7#B3EujCt-D95j^yba4TiLRiWtGF9ra;)4 z#6o>Jug6m>y&GJ6_jG$~s-trt1k?P?0aFqa_~r&9+32625{Jp65^0d!h;}5hmvLyZ zt61XhkhYu(zP{jM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zwD|;XwH+&rEhP`&Nox+zu)GRa;rQ{>seV$as$&3gdt2X&6b0_90=U?`apz46D=3;Y zt-Vl09akSA@aiAWgj%knY#YuM2^5O`)(glM3eQP!KTvSDnzLQF*uyluoDUeCQYK<6 z`AMoXMkH6Ij6(01aD@GF1L-xI(&8NG_ gushbR + + + + + 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 From 0ffb526c4321c8dace5bb520477f2f692e183dcd Mon Sep 17 00:00:00 2001 From: Meet Jain Date: Wed, 7 Aug 2024 00:08:04 +0530 Subject: [PATCH 2/5] Feat : Added popup blocker extension --- popup blocker/background.js | 31 ++++++++++++++++++++++ popup blocker/icons/icon128.png | Bin 0 -> 1913 bytes popup blocker/icons/icon16.png | Bin 0 -> 1846 bytes popup blocker/icons/icon48.png | Bin 0 -> 2095 bytes popup blocker/manifest.json | 31 ++++++++++++++++++++++ popup blocker/popup.css | 44 ++++++++++++++++++++++++++++++++ popup blocker/popup.html | 17 ++++++++++++ popup blocker/popup.js | 17 ++++++++++++ 8 files changed, 140 insertions(+) create mode 100644 popup blocker/background.js create mode 100644 popup blocker/icons/icon128.png create mode 100644 popup blocker/icons/icon16.png create mode 100644 popup blocker/icons/icon48.png create mode 100644 popup blocker/manifest.json create mode 100644 popup blocker/popup.css create mode 100644 popup blocker/popup.html create mode 100644 popup blocker/popup.js 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 0000000000000000000000000000000000000000..9deca9ab5e4691ec79d670605360458d59e17319 GIT binary patch literal 1913 zcmaJ?c{JOJ7FLX+p-d35R9X^y6t%Rqlq93}eXT8|$|TkqBw9-?KWkgMpsJ}-rIy-T zYH5X#p>5hxI|<5&lChLDwtD*JuQ~6Wch0@{yZ4-X|M>2A&$*cnb`~PSGQvDOJR+7C z(N2dr`@;qK4x>=$sf&jYb2uCtjmBoP>2!L2em)+L*V59et*xD%orORkFc=Jr#iCFsb#?XT=4NkiZ&6WE z5{Z503!F5^d%}EM`B%2R6balA63?n}TY0 z^F#L!UUL!RawYso4T0n${k`8>^35^>HO{7yyjm;Q=Seb*N`29x3Nkrs=P@S_LF zaBlbaq=iR|vZ5Cn_8)}bPf?WqQKLlvM;js*^(VE>FEIrdYtoJuf$gOe z8ci?Q-f}1H6gA#%5WfqIYR(j2&O`K0>dvIvY*IGnQozQoVV0XpmqE_)3Py7)3#NOR ziS1VMHx@yTpJWmS&r45J;EymN{)Ev7xMnPx(&%S}8_TE9G--pnGZP0+58LmdP$aM( zo{Ir+7Xe&G5Ld;EKcH|4J}Vyy-ac-mqqXIOi{iWWRwrzIPGKGx*AuF=tl6sB&g0X| zRM>|ZVGW1li3&Vxo?lF+pxoxII}={4!|YQ|&?|d<-FCzxne5nB^vw=TXwmBDSU=0A zBPEAgoFH^bY+7qehl_*0m5)(fAmtT7y~`VUsT@i6Yh_xEBi$Fw{^>QYQ8dL8&pO1> zT?2k^OHi5s#>h|Djm$<*=iOX0z!wGN9Q4&cK81Cr)PoUlP!9m=N&jKLy}~+C*7ldr z;8@By8Vpr;5+wkQ6M^c`KHzEpOoDVaWpr@4k4JM)rhpb0n;#`lBn6L=7k|TZy57}v z>&^!@m$JZ3*M`k>`GE8#W5MY9EGTr6T2Y%J7F{Z&Q@E@^FB@B4M+_{;*yW2!o0 zWyr+0%mHlsY6Ix?J?~+@>M^`!6yGft zU1IsRabXOzXw)F?ss?H+#>tt{`7`PEmphf&%IR}ZH7R*^f0`#UGJlov1a3Ha;%V?l zUPeaW!#t2{pTGNhy|A-!^$sXdbxg}@)R5TnBGvxbErGN@WR5n4Y8%VDdooF93xN{O zAXu{wzpPX7Kp?GMR?juB^+I9DH@WUY7B>NdRR1`sJIl$G-ce-=y?p z^*4k5igsVB@(_C$A*{;|F?CBg=9Ri2F^9=MLHk6!|A9S9Eo}&1S3vK%71X&bxAMmY z`j2!#9;oc>#CRNZIOblm@9NACaXeOt`l0r}H2cBkCeXCXXwzM*C0)N#s8unb@;%7* z^9PnSkc~x%yc6PG=c*E>gY7E320pnC=%G%FY-$+ z)LZ2$CmIYj(1${#rbg~;M<v+naDpduZQ?B zQ^`xYfg#zeAni&IKR7ip=4EMJG2n6_;4u!t*DtGE^WcitA~NpDH}D+v97)iz<8rjc zEP6B6Ebv+xhS+Q9QxZ1~Qg*S9y+ZU6koxrw;Z>1O5|NaKs73gOWdJ};`piEc=^^p@ zTG}`pE_P2=Qv=y^6P){fI$N7-ctl*+VTKRBXLzIyEJa1&3sBM-^~B{iQnuldOsYZs zb4^2WRrdJy XmkIcU?vUie2g+lKu|q#M_fP&0JEoY! literal 0 HcmV?d00001 diff --git a/popup blocker/icons/icon16.png b/popup blocker/icons/icon16.png new file mode 100644 index 0000000000000000000000000000000000000000..da082f8242bbb5a603bbc47709b92c7ace151a26 GIT binary patch literal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3;e2iY_F(iuSTUXvN zD*PiyoS~WaFub7hCq_!k!Ws4y*HJ2DHl~?%EuBQpaHKH2(mf4FZMaio{7&QyLxtgp z?rAzMT_weJO%+Gr39`b+5|}EEz&~lGlLEg}=8R#(&+{TQV%bN(!gTN^ zYApge%x;1{<0lkTllfN9@Lr>z=aJyH(q6=*O8&oh5s5uOn$GDXll`rkC)Z zzkxOS4Xrm!C4^BCKE?4Qmo=Es(`(5PPgJP#0K+4spU*M+pA*?I2m$A6 zrsoyQnI>`SH=Jear|4X&d~eF-EU)^?q>sr=}n_bmE{e8 zuf{l{#CqN91`O#VyTJ9x&X_beZCTINW$k z-szKUYhuO_Z>U<2AmfJ=_aoYhdieuB^j=z@F~k|-CqrrIC~juFQjYq@)%fa@ki~3wF8E)0EYDdhOYpI^#F#ifDA+Rj&`wbc^!= zaj5f-2%feYibk5My?4!~AzB?#?Ui@N4XwOf5KRYFPv;gQFs$+&0=k%}S}hdpUnzT< z&yLTp>Vrg_lcT??9jpNV^(xlP%ca08zNZrptm@1rE)QAwSh!BqHaDwvAg|16F03Kf z`pr`L_=_sOf8R&tJ~v~8ctn@{S8GZ&C_i9m2W}YB9D-LnHNf4TU^^6dcE8Hg5zL^d zmx>{WK7IK+PU>J>$E(kS&iSTzF{B;3$E~5EafZK6DN9N|= zms>wz=ssZRK49oRVCX(0Nlfz&hO@X6h8;BV{@w{$@Xv2i6m_Cr+doq(BDn5K1l7Z5 z+dn465eZ)tTtxdn8O)&iYMBWBR&6n=PbY|Rs3%qRE8b0yFY80sEnS9M(A}+llFKmU z6z0S6c)9hkl&bFx<=ZG;t>K_Pl@9 z3>%%PQ;tCTIhHpO{3SZB_4czfb2P)C4DRUx000000000000000000000093t Z{sXmBkN3PprYrye002ovPDHLkV1i|c^CAEM literal 0 HcmV?d00001 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 From 07fc6c3f4b4af31667b12e4d7aa71fc8f091bba0 Mon Sep 17 00:00:00 2001 From: Meet Jain Date: Thu, 8 Aug 2024 16:00:36 +0530 Subject: [PATCH 3/5] Update background.js --- popup blocker/background.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/popup blocker/background.js b/popup blocker/background.js index 454f3517..a45729c0 100644 --- a/popup blocker/background.js +++ b/popup blocker/background.js @@ -28,4 +28,4 @@ chrome.runtime.onMessage.addListener(function(request, sender, sendResponse) { } else if (request.action === "getBlockingStatus") { sendResponse({ blocking: blocking }); } -}); +}); \ No newline at end of file From 08e2e5bbef9f5acb8f2fb8a68ab50e655621a06e Mon Sep 17 00:00:00 2001 From: Meet Jain Date: Thu, 8 Aug 2024 16:16:54 +0530 Subject: [PATCH 4/5] Directory deleted --- popup blocker/background.js | 31 ---------------------- popup blocker/icons/icon128.png | Bin 1913 -> 0 bytes popup blocker/icons/icon16.png | Bin 1846 -> 0 bytes popup blocker/icons/icon48.png | Bin 2095 -> 0 bytes popup blocker/manifest.json | 31 ---------------------- popup blocker/popup.css | 44 -------------------------------- popup blocker/popup.html | 17 ------------ popup blocker/popup.js | 17 ------------ 8 files changed, 140 deletions(-) delete mode 100644 popup blocker/background.js delete mode 100644 popup blocker/icons/icon128.png delete mode 100644 popup blocker/icons/icon16.png delete mode 100644 popup blocker/icons/icon48.png delete mode 100644 popup blocker/manifest.json delete mode 100644 popup blocker/popup.css delete mode 100644 popup blocker/popup.html delete mode 100644 popup blocker/popup.js diff --git a/popup blocker/background.js b/popup blocker/background.js deleted file mode 100644 index a45729c0..00000000 --- a/popup blocker/background.js +++ /dev/null @@ -1,31 +0,0 @@ -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 }); - } -}); \ No newline at end of file diff --git a/popup blocker/icons/icon128.png b/popup blocker/icons/icon128.png deleted file mode 100644 index 9deca9ab5e4691ec79d670605360458d59e17319..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 1913 zcmaJ?c{JOJ7FLX+p-d35R9X^y6t%Rqlq93}eXT8|$|TkqBw9-?KWkgMpsJ}-rIy-T zYH5X#p>5hxI|<5&lChLDwtD*JuQ~6Wch0@{yZ4-X|M>2A&$*cnb`~PSGQvDOJR+7C z(N2dr`@;qK4x>=$sf&jYb2uCtjmBoP>2!L2em)+L*V59et*xD%orORkFc=Jr#iCFsb#?XT=4NkiZ&6WE z5{Z503!F5^d%}EM`B%2R6balA63?n}TY0 z^F#L!UUL!RawYso4T0n${k`8>^35^>HO{7yyjm;Q=Seb*N`29x3Nkrs=P@S_LF zaBlbaq=iR|vZ5Cn_8)}bPf?WqQKLlvM;js*^(VE>FEIrdYtoJuf$gOe z8ci?Q-f}1H6gA#%5WfqIYR(j2&O`K0>dvIvY*IGnQozQoVV0XpmqE_)3Py7)3#NOR ziS1VMHx@yTpJWmS&r45J;EymN{)Ev7xMnPx(&%S}8_TE9G--pnGZP0+58LmdP$aM( zo{Ir+7Xe&G5Ld;EKcH|4J}Vyy-ac-mqqXIOi{iWWRwrzIPGKGx*AuF=tl6sB&g0X| zRM>|ZVGW1li3&Vxo?lF+pxoxII}={4!|YQ|&?|d<-FCzxne5nB^vw=TXwmBDSU=0A zBPEAgoFH^bY+7qehl_*0m5)(fAmtT7y~`VUsT@i6Yh_xEBi$Fw{^>QYQ8dL8&pO1> zT?2k^OHi5s#>h|Djm$<*=iOX0z!wGN9Q4&cK81Cr)PoUlP!9m=N&jKLy}~+C*7ldr z;8@By8Vpr;5+wkQ6M^c`KHzEpOoDVaWpr@4k4JM)rhpb0n;#`lBn6L=7k|TZy57}v z>&^!@m$JZ3*M`k>`GE8#W5MY9EGTr6T2Y%J7F{Z&Q@E@^FB@B4M+_{;*yW2!o0 zWyr+0%mHlsY6Ix?J?~+@>M^`!6yGft zU1IsRabXOzXw)F?ss?H+#>tt{`7`PEmphf&%IR}ZH7R*^f0`#UGJlov1a3Ha;%V?l zUPeaW!#t2{pTGNhy|A-!^$sXdbxg}@)R5TnBGvxbErGN@WR5n4Y8%VDdooF93xN{O zAXu{wzpPX7Kp?GMR?juB^+I9DH@WUY7B>NdRR1`sJIl$G-ce-=y?p z^*4k5igsVB@(_C$A*{;|F?CBg=9Ri2F^9=MLHk6!|A9S9Eo}&1S3vK%71X&bxAMmY z`j2!#9;oc>#CRNZIOblm@9NACaXeOt`l0r}H2cBkCeXCXXwzM*C0)N#s8unb@;%7* z^9PnSkc~x%yc6PG=c*E>gY7E320pnC=%G%FY-$+ z)LZ2$CmIYj(1${#rbg~;M<v+naDpduZQ?B zQ^`xYfg#zeAni&IKR7ip=4EMJG2n6_;4u!t*DtGE^WcitA~NpDH}D+v97)iz<8rjc zEP6B6Ebv+xhS+Q9QxZ1~Qg*S9y+ZU6koxrw;Z>1O5|NaKs73gOWdJ};`piEc=^^p@ zTG}`pE_P2=Qv=y^6P){fI$N7-ctl*+VTKRBXLzIyEJa1&3sBM-^~B{iQnuldOsYZs zb4^2WRrdJy XmkIcU?vUie2g+lKu|q#M_fP&0JEoY! diff --git a/popup blocker/icons/icon16.png b/popup blocker/icons/icon16.png deleted file mode 100644 index da082f8242bbb5a603bbc47709b92c7ace151a26..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 1846 zcma)-c|6mPAIJ6m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PiyoS~WaFub7hCq_!k!Ws4y*HJ2DHl~?%EuBQpaHKH2(mf4FZMaio{7&QyLxtgp z?rAzMT_weJO%+Gr39`b+5|}EEz&~lGlLEg}=8R#(&+{TQV%bN(!gTN^ zYApge%x;1{<0lkTllfN9@Lr>z=aJyH(q6=*O8&oh5s5uOn$GDXll`rkC)Z zzkxOS4Xrm!C4^BCKE?4Qmo=Es(`(5PPgJP#0K+4spU*M+pA*?I2m$A6 zrsoyQnI>`SH=Jear|4X&d~eF-EU)^?q>sr=}n_bmE{e8 zuf{l{#CqN91`O#VyTJ9x&X_beZCTINW$k z-szKUYhuO_Z>U<2AmfJ=_aoYhdieuB^j=z@F~k|-CqrrIC~juFQjYq@)%fa@ki~3wF8E)0EYDdhOYpI^#F#ifDA+Rj&`wbc^!= zaj5f-2%feYibk5My?4!~AzB?#?Ui@N4XwOf5KRYFPv;gQFs$+&0=k%}S}hdpUnzT< z&yLTp>Vrg_lcT??9jpNV^(xlP%ca08zNZrptm@1rE)QAwSh!BqHaDwvAg|16F03Kf z`pr`L_=_sOf8R&tJ~v~8ctn@{S8GZ&C_i9m2W}YB9D-LnHNf4TU^^6dcE8Hg5zL^d zmx>{WK7IK+PU>J>$E(kS&iSTzF{B;3$E~5EafZK6DN9N|= zms>wz=ssZRK49oRVCX(0Nlfz&hO@X6h8;BV{@w{$@Xv2i6m_Cr+doq(BDn5K1l7Z5 z+dn465eZ)tTtxdn8O)&iYMBWBR&6n=PbY|Rs3%qRE8b0yFY80sEnS9M(A}+llFKmU z6z0S6c)9hkl&bFx<=ZG;t>K_Pl@9 z3>%%PQ;tCTIhHpO{3SZB_4czfb2P)C4DRUx000000000000000000000093t Z{sXmBkN3PprYrye002ovPDHLkV1i|c^CAEM diff --git a/popup blocker/manifest.json b/popup blocker/manifest.json deleted file mode 100644 index e8b114ee..00000000 --- a/popup blocker/manifest.json +++ /dev/null @@ -1,31 +0,0 @@ -{ - "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 deleted file mode 100644 index cf4a4dba..00000000 --- a/popup blocker/popup.css +++ /dev/null @@ -1,44 +0,0 @@ -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 deleted file mode 100644 index 15f0b265..00000000 --- a/popup blocker/popup.html +++ /dev/null @@ -1,17 +0,0 @@ - - - - - - Popup Blocker - - - -
-

Popup Blocker

-

Status: Active

- -
- - - diff --git a/popup blocker/popup.js b/popup blocker/popup.js deleted file mode 100644 index f5f27546..00000000 --- a/popup blocker/popup.js +++ /dev/null @@ -1,17 +0,0 @@ -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 From 70c72e3f02d6a122781d2773a690b5166fcec6d9 Mon Sep 17 00:00:00 2001 From: Meet Jain Date: Thu, 8 Aug 2024 16:18:12 +0530 Subject: [PATCH 5/5] Changed directory name --- Popup Blocker/background.js | 31 ++++++++++++++++++++++ Popup Blocker/icons/icon128.png | Bin 0 -> 1913 bytes Popup Blocker/icons/icon16.png | Bin 0 -> 1846 bytes Popup Blocker/icons/icon48.png | Bin 0 -> 2095 bytes Popup Blocker/manifest.json | 31 ++++++++++++++++++++++ Popup Blocker/popup.css | 44 ++++++++++++++++++++++++++++++++ Popup Blocker/popup.html | 17 ++++++++++++ Popup Blocker/popup.js | 17 ++++++++++++ 8 files changed, 140 insertions(+) create mode 100644 Popup Blocker/background.js create mode 100644 Popup Blocker/icons/icon128.png create mode 100644 Popup Blocker/icons/icon16.png create mode 100644 Popup Blocker/icons/icon48.png create mode 100644 Popup Blocker/manifest.json create mode 100644 Popup Blocker/popup.css create mode 100644 Popup Blocker/popup.html create mode 100644 Popup Blocker/popup.js 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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ZH7R*^f0`#UGJlov1a3Ha;%V?l zUPeaW!#t2{pTGNhy|A-!^$sXdbxg}@)R5TnBGvxbErGN@WR5n4Y8%VDdooF93xN{O zAXu{wzpPX7Kp?GMR?juB^+I9DH@WUY7B>NdRR1`sJIl$G-ce-=y?p z^*4k5igsVB@(_C$A*{;|F?CBg=9Ri2F^9=MLHk6!|A9S9Eo}&1S3vK%71X&bxAMmY z`j2!#9;oc>#CRNZIOblm@9NACaXeOt`l0r}H2cBkCeXCXXwzM*C0)N#s8unb@;%7* z^9PnSkc~x%yc6PG=c*E>gY7E320pnC=%G%FY-$+ z)LZ2$CmIYj(1${#rbg~;M<v+naDpduZQ?B zQ^`xYfg#zeAni&IKR7ip=4EMJG2n6_;4u!t*DtGE^WcitA~NpDH}D+v97)iz<8rjc zEP6B6Ebv+xhS+Q9QxZ1~Qg*S9y+ZU6koxrw;Z>1O5|NaKs73gOWdJ};`piEc=^^p@ zTG}`pE_P2=Qv=y^6P){fI$N7-ctl*+VTKRBXLzIyEJa1&3sBM-^~B{iQnuldOsYZs zb4^2WRrdJy XmkIcU?vUie2g+lKu|q#M_fP&0JEoY! literal 0 HcmV?d00001 diff --git a/Popup Blocker/icons/icon16.png b/Popup Blocker/icons/icon16.png new file mode 100644 index 0000000000000000000000000000000000000000..da082f8242bbb5a603bbc47709b92c7ace151a26 GIT binary patch literal 1846 zcma)-c|6mPAIJ6mnwFKuzFM)|MUFC}uzf`=$J}QmYo){-v+V0=;!|?e9F^loBq~?f zoH^IN2sOt%WSe6;Da{Mo{#tA_5Uly+3~^wX$5Hs35f%?Hdd~? z`Dyn)ga6$1=^9(|Zp1lb-K}?ac6O1)VvUcFo0^(#ZEelW%)EX3mP{sRXJ_Z<=cCbR z5C|j?2>5*d^z<~F%~n=cHZ(M>tE)>)OcaSkK0ZFh#l?}4k#IO1kH=G~RCjmxs;VkF zojx!yfWcsNb#+@?ThE_ApOlmo5)z`NrKPB-C@U-L>FJq|f(}VYNRe!3JQW_ zD@>sn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beZCTINW$k z-szKUYhuO_Z>U<2AmfJ=_aoYhdieuB^j=z@F~k|-CqrrIC~juFQjYq@)%fa@ki~3wF8E)0EYDdhOYpI^#F#ifDA+Rj&`wbc^!= zaj5f-2%feYibk5My?4!~AzB?#?Ui@N4XwOf5KRYFPv;gQFs$+&0=k%}S}hdpUnzT< z&yLTp>Vrg_lcT??9jpNV^(xlP%ca08zNZrptm@1rE)QAwSh!BqHaDwvAg|16F03Kf z`pr`L_=_sOf8R&tJ~v~8ctn@{S8GZ&C_i9m2W}YB9D-LnHNf4TU^^6dcE8Hg5zL^d zmx>{WK7IK+PU>J>$E(kS&iSTzF{B;3$E~5EafZK6DN9N|= zms>wz=ssZRK49oRVCX(0Nlfz&hO@X6h8;BV{@w{$@Xv2i6m_Cr+doq(BDn5K1l7Z5 z+dn465eZ)tTtxdn8O)&iYMBWBR&6n=PbY|Rs3%qRE8b0yFY80sEnS9M(A}+llFKmU z6z0S6c)9hkl&bFx<=ZG;t>K_Pl@9 z3>%%PQ;tCTIhHpO{3SZB_4czfb2P)C4DRUx000000000000000000000093t Z{sXmBkN3PprYrye002ovPDHLkV1i|c^CAEM literal 0 HcmV?d00001 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