Tampermonkey脚本模板:Hello World!





// ==UserScript==
// @name         mz_demo
// @namespace    com.mzwu.www
// @description  mzwu.com userscripts demo.
// @include      https://www.mzwu.com/*
// @require      http://code.jquery.com/jquery-1.12.4.min.js
// @run-at       document-end
// @author       dnawo
// @version      1.0
// ==/UserScript==

(function() {
    'use strict';
    
    try
    {
        if (typeof jQuery == "function") {
            $.noConflict();
            jQuery(document).ready(function($) {
                // Your code here...
                alert($("title").text());
            });
        }
    }
    catch(ex)
    {
        alert("err:" + ex);
    }
})();

参考资料

[1].API 文档:https://www.tampermonkey.net/documentation.php
[2].常见问题:https://www.tampermonkey.net/faq.php?ext=dhdg
[3].Userscripts:https://userscripts-mirror.org/
[4].Greasy Fork:https://greasyfork.org/zh-CN
[5].OpenUserJS :https://openuserjs.org/

评论: 0 | 引用: 0 | 查看次数: 1551
发表评论
登录后再发表评论!