Hides the header and promo gallery on Google AI Studio using a robust CSS injection method.
// ==UserScript==
// @name 隐藏 AI Studio 界面元素 (头部/推广)
// @namespace http://tampermonkey.net/
// @version 1.2
// @description Hides the header and promo gallery on Google AI Studio using a robust CSS injection method.
// @description:zh-CN 通过强大的CSS注入方法,隐藏 Google AI Studio 上的头部和推广画廊。
// @author hdh
// @match *://aistudio.google.com/*
// @grant GM_addStyle
// @license MIT
// ==/UserScript==
(function() {
'use strict';
const selectorsToHide = [
'ms-header-root',
'ms-promo-gallery'
];
const cssSelectorString = selectorsToHide.join(', ');
const css = `
${cssSelectorString} {
display: none !important;
}
`;
GM_addStyle(css);
console.log('Tampermonkey: CSS rule to hide header and promo elements has been injected.');
})();