Tampermonkey油猴

2022-05-07  本文已影响0人  李霖弢

浏览器用户脚本管理器插件,用于安装开源脚本,也可以自己编写脚本。

自行编写脚本

ES lint的全局变量报错可以如下代码解决:/* globals jQuery, $, waitForKeyElements */

一个用于隐藏油猴底部广告的demo脚本
// ==UserScript==
// @name         tampermonkey no ads
// @namespace    http://www.timeforus.cn/
// @version      0.1
// @description  try to take over the world!
// @author       Witty ME
// @match        https://www.tampermonkey.net/*
// @match        https://*/*
// @icon         https://www.google.com/s2/favicons?sz=64&domain=tampermonkey.net
// @grant        unsafeWindow
// @require      http://code.jquery.com/jquery-1.11.0.min.js
// ==/UserScript==

/* globals jQuery, $, waitForKeyElements */
(function() {
    'use strict';
    console.log("This is Witty Me.I don't wanna see ads.");
    $(".adsbygoogle").css('display','none');
})();
上一篇 下一篇

猜你喜欢

热点阅读