Tampermonkey脚本属性

新建脚本属性:

// ==UserScript==
// @name         New Userscript   脚本名
// @namespace    http://tampermonkey.net/  脚本主页
// @version      0.1    版本
// @description  try to take over the world! 介绍
// @author       You    作者
// @match        https://www.baidu.com/  匹配到什么页面执行此脚本
// @grant        none  需求权限
// ==/UserScript==

(function() {
    'use strict';

    // Your code here...
})();

拓展:

//@license 代码许可;
// @include 和 @match 类似,表示匹配的网站
// @require 表示要使用的 js 库
// @homepageURL https://* 主页
// @supportURL https://* 问题报告页面
// @downloadURL https://* 下载地址
// @updateURL https://* 自动更新地址
除此之外还有很多,具体可参考官方文档
posted @ 2018-11-06 09:28  始觉春空  阅读(1067)  评论(0编辑  收藏  举报