Last active
October 11, 2025 17:51
-
-
Save wellington1993/607b9f43272439c64e2efdbf99c10beb to your computer and use it in GitHub Desktop.
Deblocker Remover tampermonkey
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 Deblocker Controlador (Focado no Novizer) | |
| // @namespace http://tampermonkey.net/ | |
| // @version 1.9 | |
| // @description Adiciona controle manual para fechar divs fixas no Novizer | |
| // @author Wellington (com ajuda de Grok) | |
| // @match https://novizer.com/* | |
| // @grant none | |
| // @run-at document-end | |
| // ==/UserScript== | |
| (function() { | |
| 'use strict'; | |
| // Função com delay pra dar tempo ao DOM | |
| function initScript() { | |
| console.log('Deblocker Controlador iniciado no Novizer: ' + window.location.href); | |
| // Seletor para divs fixas como k-ov | |
| const fixedDivs = document.querySelectorAll('div[style*="position: fixed"][style*="z-index: 2147483647"]'); | |
| fixedDivs.forEach(div => { | |
| // Verifica se já tem botão pra evitar duplicação | |
| if (!div.querySelector('.close-btn')) { | |
| // Cria botão de fechar | |
| const closeBtn = document.createElement('button'); | |
| closeBtn.textContent = 'Fechar'; | |
| closeBtn.className = 'close-btn'; | |
| closeBtn.style.cssText = 'position: absolute; top: 10px; right: 10px; padding: 5px 10px; border: 0; border-radius: 4px; background: #ff4444; color: #fff; cursor: pointer; z-index: 2147483648;'; | |
| // Adiciona evento pra ocultar a div | |
| closeBtn.addEventListener('click', () => { | |
| div.style.display = 'none'; | |
| console.log('Div fechada: ' + div.id || 'sem id'); | |
| }); | |
| // Adiciona botão à div | |
| div.appendChild(closeBtn); | |
| } | |
| }); | |
| // Observa e adiciona botão em reinjeções | |
| const observer = new MutationObserver((mutations) => { | |
| const newFixedDivs = document.querySelectorAll('div[style*="position: fixed"][style*="z-index: 2147483647"]'); | |
| newFixedDivs.forEach(div => { | |
| if (!div.querySelector('.close-btn')) { | |
| const closeBtn = document.createElement('button'); | |
| closeBtn.textContent = 'Fechar'; | |
| closeBtn.className = 'close-btn'; | |
| closeBtn.style.cssText = 'position: absolute; top: 10px; right: 10px; padding: 5px 10px; border: 0; border-radius: 4px; background: #ff4444; color: #fff; cursor: pointer; z-index: 2147483648;'; | |
| closeBtn.addEventListener('click', () => { | |
| div.style.display = 'none'; | |
| console.log('Div fechada: ' + div.id || 'sem id'); | |
| }); | |
| div.appendChild(closeBtn); | |
| } | |
| }); | |
| }); | |
| observer.observe(document.body, { childList: true, subtree: true }); | |
| } | |
| // Executa com delay de 2500ms | |
| setTimeout(initScript, 2500); | |
| })(); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment