注入vue到智慧基建

进入系统后,三秒后注入devtools到vue

目前为 2025-04-01 提交的版本。查看 最新版本

// ==UserScript==
// @name         注入vue到智慧基建
// @namespace    http://tampermonkey.net/
// @version      20250401145811
// @description  进入系统后,三秒后注入devtools到vue
// @author       You
// @match        https://10-152-252-1-9fse9py3ym8010c.ztna-dingtalk.com/*
// @match        https://test1.gzztdh.com:9445/*
// @icon         https://www.google.com/s2/favicons?sz=64&domain=ztna-dingtalk.com
// @grant        none
// ==/UserScript==

(function () {
    'use strict';

    window.onload = function () {
        setTimeout(function () {
            // Your code here...
            if (!$) {
                return
            }
            let jqe = $("#app");
            if (!jqe) {
                return;
            }
            const devtools = window.__VUE_DEVTOOLS_GLOBAL_HOOK__;
            const Vue = jqe[0].__vue__.__proto__.__proto__.constructor;
            Vue.config.devtools = true;
            devtools.emit("init", Vue);
        }, 3000)
    }
})();