优化掉百家号首页遮挡收益的AI助手页面
// ==UserScript== // @name 百家号AI优化助手 // @namespace http://tampermonkey.net/ // @version 1.2 // @description 优化掉百家号首页遮挡收益的AI助手页面 // @author @诸葛 // @license MIT // @match https://baijiahao.baidu.com/* // @match https://baijiahao.baidu.com/builder/rc/home // @grant none // @run-at document-end // ==/UserScript== (function() { 'use strict'; function hideAICopilot() { const element = document.getElementById("AICopilot"); if (element) { element.style.display = "none"; } } function modifyMarginRight() { const targetElement = document.querySelector('.cheetah-row.cheetah-public.css-11lc5sr'); if (targetElement) { targetElement.style.marginRight = '-500px'; } } hideAICopilot(); modifyMarginRight(); const intervalID = setInterval(() => { hideAICopilot(); modifyMarginRight(); }, 1000); setTimeout(() => { clearInterval(intervalID); }, 10000); })();