Greasy Fork is available in English.
去除react官网顶部横幅
// ==UserScript==
// @name react官网顶部横幅隐藏
// @namespace http://tampermonkey.net/
// @version 0.1
// @description 去除react官网顶部横幅
// @author You
// @match https://*.reactjs.org/*
// @grant none
// @license MIT
// ==/UserScript==
(function() {
'use strict';
var targetNode = document.getElementById('___gatsby')
var config = { attributes: true, childList: true, subtree: true }
var callback = function(mutationsList, observer) {
for(var mutation of mutationsList) {
if (mutation.type === 'childList') {
document.querySelector('.css-1loxuh3').style.display = 'none'
document.querySelector('.css-tctv7l').style.display = 'none'
}
}
};
var observer = new MutationObserver(callback);
observer.observe(targetNode, config);
})();