您需要先安装一个扩展,例如 篡改猴、Greasemonkey 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 Userscripts ,之后才能安装此脚本。
您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey,才能安装此脚本。
您需要先安装用户脚本管理器扩展后才能安装此脚本。
open the vue devtools
当前为
// ==UserScript== // @name 开启vue dev // @namespace http://tampermonkey.net/ // @version 2025-06-17 // @description open the vue devtools // @author mrwhat // @license MI // @match https://github.com/EHfive/userscripts // @icon https://www.google.com/s2/favicons?sz=64&domain=github.com // @run-at document-idle // ==/UserScript== (function() { 'use strict'; if (document && document.documentElement && document.documentElement.appendChild) { const script = document.createElement('script'); script.textContent = ` try { let _init_ = () => { console.log('启动注入') const doc = Array.from(document.querySelectorAll('*')).find((e) => e.__vue_app__) || document.querySelector("#app") if (!doc) return; const app = doc.__vue_app__; const version = app.version; console.log('发现vue.js', version); const devtools = window.__VUE_DEVTOOLS_GLOBAL_HOOK__ devtools.enabled = true devtools.emit('app:init', app, version, {}) } const button = document.createElement('button') button.id = '_hacking_' button.innerHTML = '注入dev' button.addEventListener('click', _init_) button.style.position = 'fixed' button.style.top = '0' button.style.right = '0' button.style.zIndex = '1000' button.style.cursor = 'pointer' document.body.appendChild(button) } catch (e) { } ` document.documentElement.appendChild(script); script.remove(); } })();