您需要先安装一个扩展,例如 篡改猴、Greasemonkey 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 Userscripts ,之后才能安装此脚本。
您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey,才能安装此脚本。
您需要先安装用户脚本管理器扩展后才能安装此脚本。
关闭摸鱼奎恩直播间橱窗黑条
// ==UserScript== // @name 摸鱼奎恩直播间关闭橱窗 // @namespace http://tampermonkey.net/ // @version 1.4 // @description 关闭摸鱼奎恩直播间橱窗黑条 // @author acpass // @match https://live.douyin.com/200525029536/* // @grant none // @license MIT // ==/UserScript== (function() { 'use strict'; function modifyElementsByStyleAndHideById() { // Remove style attribute from div elements with a specific style but different class names const divElements = document.querySelectorAll('div[style="margin-right: 120px;"]'); if (divElements.length > 0) { divElements.forEach((div) => { if (div.hasAttribute('style')) { div.removeAttribute('style'); console.log('Style attribute removed from a div element.'); } }); } else { console.log('No div elements with the specified style found.'); } // Hide the specified div by ID const targetDiv = document.getElementById('__living_frame_right_panel_id'); if (targetDiv) { targetDiv.style.display = 'none'; console.log('Target div is hidden by ID.'); } else { console.log('Target div not found by ID.'); } } // Run the function after the page loads window.addEventListener('load', modifyElementsByStyleAndHideById); // Optional: if the target divs are dynamically loaded, you might need to use a MutationObserver to watch for changes const observer = new MutationObserver((mutations) => { mutations.forEach((mutation) => { if (mutation.addedNodes.length > 0) { modifyElementsByStyleAndHideById(); } }); }); // Observe changes in the document observer.observe(document.body, { childList: true, subtree: true }); })();