From 8318ff045053306b7b434e1f24c15b527d91a90c Mon Sep 17 00:00:00 2001 From: isanchop Date: Wed, 13 Dec 2023 11:24:10 -0300 Subject: [PATCH] Update v0.5.5 - fix blured images --- manifest.json | 2 +- remove-banner.js | 10 +++++----- remove-blur.js | 15 ++++++++++++++- 3 files changed, 20 insertions(+), 7 deletions(-) diff --git a/manifest.json b/manifest.json index 2cb139a..ccd716c 100644 --- a/manifest.json +++ b/manifest.json @@ -2,7 +2,7 @@ "manifest_version": 3, "name": "StuHack", - "version": "0.5.4", + "version": "0.5.5", "description": "Banner remover, filter pass & document downloader", "icons": { "16": "img/icon16.png", diff --git a/remove-banner.js b/remove-banner.js index 1ae4d92..32c1f43 100644 --- a/remove-banner.js +++ b/remove-banner.js @@ -10,11 +10,11 @@ window.addEventListener('load', function(){ if(premiumButton != null){ premiumButton.parentNode.removeChild(premiumButton); } - var banner_wrapper = document.querySelectorAll("_8690b6fc16a3,.banner-wrapper,_4d5ecd011027"); - if (banner_wrapper != null) { - for (i = 0; i < banner_wrapper.length; i++) { - banner_wrapper[i].style.display = "none"; - } + var banner_wrappers = Array.from(document.getElementsByClassName('banner-wrapper')); + if (banner_wrappers != null) { + banner_wrappers.forEach( (banner_wrapper) => { + banner_wrapper.parentNode.removeChild(banner_wrapper); + }); } /* Mobile */ diff --git a/remove-blur.js b/remove-blur.js index 444e3ae..a5fabad 100644 --- a/remove-blur.js +++ b/remove-blur.js @@ -9,4 +9,17 @@ window.addEventListener('load', function(){ } pages[i].classList.add("nofilter"); } -}); + + document.getElementById('viewer-wrapper').addEventListener('scroll', () => { + var bluredContainers = Array.from(document.getElementsByClassName('blurred-container')); + bluredContainers.forEach( (bluredContainer) => { + bluredContainer.firstChild.src = bluredContainer.firstChild.src.replace('/blurred/', '/'); + bluredContainer.firstChild.classList.add('bi', 'x0', 'y0', 'w1', 'h1'); + console.log(bluredContainer.firstChild.src); + bluredContainer.classList.remove('blurred-container'); + + }); + }); + + +}); \ No newline at end of file