Created
January 4, 2025 02:43
-
-
Save robot00f/8b2b663c820ca7d9dfda586b102c899b to your computer and use it in GitHub Desktop.
Habilitar Scroll en Meganoticias Mendoza
This file contains hidden or 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
// ==UserScript== | |
// @name Habilitar Scroll en Meganoticias Mendoza | |
// @namespace http://tampermonkey.net/ | |
// @version 0.3 | |
// @description Habilita el scroll en la página "Meganoticias Mendoza" deshabilitando el bloqueo de adblocker. | |
// @author GitHub Copilot | |
// @match https://meganoticiasmendoza.ar/* | |
// @grant none | |
// ==/UserScript== | |
(function() { | |
'use strict'; | |
function enableScroll() { | |
// Remover el elemento de detección de adblock | |
let adblockDetectedElement = document.getElementById('adblock-detected'); | |
if (adblockDetectedElement) { | |
adblockDetectedElement.remove(); | |
} | |
// Habilitar el scroll en el cuerpo del documento | |
document.body.style.overflow = 'auto'; | |
// Cambiar el estilo del overflow de todos los elementos a 'auto' | |
let elements = document.querySelectorAll('*'); | |
elements.forEach(function(element) { | |
if (window.getComputedStyle(element).overflow !== 'visible') { | |
element.style.overflow = 'auto'; | |
} | |
}); | |
} | |
// Esperar a que el DOM esté completamente cargado | |
window.addEventListener('load', enableScroll); | |
// Intentar habilitar el scroll después de un pequeño retraso | |
setTimeout(enableScroll, 100); | |
})(); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment