网站更新内容:请访问: https://bigdata.ministep.cn/

使用油猴脚本隐藏页面部分元素

使用油猴脚本隐藏cofluence弹窗

脚本代码如下:

// ==UserScript==
// @name         confluence隐藏通知
// @namespace    http://tampermonkey.net/
// @version      0.1
// @description  try to take over the world!
// @require      https://code.jquery.com/jquery-2.1.4.min.js
// @author       coonfluence
// @match        http://localhost:8090/*
// @icon         https://www.google.com/s2/favicons?domain=undefined.localhost
// @grant        none
// @run-at       document-end
// ==/UserScript==

(function() {
	//1.原生js写法
   //let content_right=document.getElementById("aui-flag-container");
   //if(content_right!=null){ content_right.style.display="none";}
	//2.jQuery写法,油猴现在已经支持jQuery了
	$('#aui-flag-container').hide();
   // 'use strict';
   //  document.querySelector("#aui-flag-container").style.display = "none";
    // Your code here...
})();

注意事项;

// @run-at       document-end

在调度DOMContentLoaded事件时或之后将注入脚本。

参考:

油猴脚本API - moyu0 - 博客园

posted @   ministep88  阅读(744)  评论(0编辑  收藏  举报
相关博文:
阅读排行:
· 周边上新:园子的第一款马克杯温暖上架
· 分享 3 个 .NET 开源的文件压缩处理库,助力快速实现文件压缩解压功能!
· Ollama——大语言模型本地部署的极速利器
· DeepSeek如何颠覆传统软件测试?测试工程师会被淘汰吗?
· 使用C#创建一个MCP客户端
网站更新内容:请访问:https://bigdata.ministep.cn/
点击右上角即可分享
微信分享提示