nxbrew_noads_always_search

remove ad blocker warning page, ad jump, and make search expand visible

您需要先安裝使用者腳本管理器擴展,如 TampermonkeyGreasemonkeyViolentmonkey 之後才能安裝該腳本。

您需要先安裝使用者腳本管理器擴充功能,如 TampermonkeyViolentmonkey 後才能安裝該腳本。

您需要先安裝使用者腳本管理器擴充功能,如 TampermonkeyViolentmonkey 後才能安裝該腳本。

您需要先安裝使用者腳本管理器擴充功能,如 TampermonkeyUserscripts 後才能安裝該腳本。

你需要先安裝一款使用者腳本管理器擴展,比如 Tampermonkey,才能安裝此腳本

您需要先安裝使用者腳本管理器擴充功能後才能安裝該腳本。

(我已經安裝了使用者腳本管理器,讓我安裝!)

你需要先安裝一款使用者樣式管理器擴展,比如 Stylus,才能安裝此樣式

你需要先安裝一款使用者樣式管理器擴展,比如 Stylus,才能安裝此樣式

你需要先安裝一款使用者樣式管理器擴展,比如 Stylus,才能安裝此樣式

你需要先安裝一款使用者樣式管理器擴展後才能安裝此樣式

你需要先安裝一款使用者樣式管理器擴展後才能安裝此樣式

你需要先安裝一款使用者樣式管理器擴展後才能安裝此樣式

(我已經安裝了使用者樣式管理器,讓我安裝!)

// ==UserScript==
// @name         nxbrew_noads_always_search
// @namespace    http://tampermonkey.net/
// @version      20250401
// @description  remove ad blocker warning page, ad jump, and make search expand visible
// @author       FlyingPoo
// @match        https://nxbrew.com/*
// @match        https://nxbrew.net/*
// @icon         https://www.google.com/s2/favicons?sz=64&domain=nxbrew.com
// @grant        none
// @run-at       document-idle
// @license      MIT
// ==/UserScript==

(function() {
    document.querySelectorAll('iframe').forEach(function(elem) {
        elem.parentNode.removeChild(elem);
    });

    var es = document.getElementsByTagName("div");
    for (var i = 0; i < es.length; i++) {
        if (es[i].id.match(/^[a-z]{52,}/g)) {
            es[i].remove();
            continue;
        }
        if (es[i].style.pointerEvents == "auto") {
            es[i].remove();
            continue;
        }
    }

    var adElements = ["adunblocker-js-extra", "adunblocker-js", "adunblocker-css"];
    adElements.forEach(function(id) {
        var elem = document.getElementById(id);
        if (elem) elem.remove();
    });

    var style = document.createElement('style');
    style.innerHTML = `
        .search-expand {
            display: block !important;
        }
    `;
    document.head.appendChild(style);
})();