Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- // ==UserScript==
- // @name 隐藏元素
- // @namespace http://tampermonkey.net/
- // @version 2024-04-23
- // @description try to take over the world!
- // @author You
- // @match https://leetcode.cn/*
- // @icon https://www.google.com/s2/favicons?sz=64&domain=leetcode.cn
- // @grant none
- // ==/UserScript==
- (function() {
- 'use strict';
- const hides = [
- 'a[class="mb-0.5 flex items-center mr-8"]', // brand
- 'ul[class="relative mr-2 flex h-10 items-center"]',// brand
- 'a[class="-mr-2 md:mr-0"]', // 推荐
- 'div[class="mt-8"]', // 学习计划
- 'div[class="-mr-2 md:mr-0"]', // 学习计划
- 'div[class="col-span-4 md:col-span-1"]', // 侧边栏
- 'footer',
- ];
- var fn = () => {
- hides.forEach(function(v) {
- const node = document.querySelector(v);
- if (node && node.style) {
- node.style.display = "none";
- }
- })
- };
- [500, 1000, 3000].forEach(t => setTimeout(fn, t));
- setInterval(fn, 10000);
- })();
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement