网站更新内容:请访问: 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 @ 2022-03-29 15:08  ministep88  阅读(832)  评论(0)    收藏  举报
网站更新内容:请访问:https://bigdata.ministep.cn/