您需要先安装一个扩展,例如 篡改猴、Greasemonkey 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 Userscripts ,之后才能安装此脚本。
您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey,才能安装此脚本。
您需要先安装用户脚本管理器扩展后才能安装此脚本。
yapi to ts
当前为
// ==UserScript== // @name yapiTots // @namespace yapiTots // @version 0.0.3 // @description yapi to ts // @license MIT // @author hjl // @match http://192.168.140.245:3000/* // @icon https://img2.baidu.com/it/u=3318407772,3634490264&fm=253&fmt=auto?w=1200&h=767 // @grant none // ==/UserScript== window.whiteList = ['http://192.168.140.245:3000'] if(!window.whiteList.includes(window.location.origin)){ return } const dayJsUrl = 'https://unpkg.com/[email protected]/dayjs.min.js' const vueUrl ='https://6465-develop-0ggt1xa152c00a65-1323643080.tcb.qcloud.la/yapi-ts/vue.js' const axiosUrl = 'https://6465-develop-0ggt1xa152c00a65-1323643080.tcb.qcloud.la/yapi-ts/axios.js' const elementCss='https://6465-develop-0ggt1xa152c00a65-1323643080.tcb.qcloud.la/yapi-ts/element-ui.css' const elementJs ='https://6465-develop-0ggt1xa152c00a65-1323643080.tcb.qcloud.la/yapi-ts/element-ui.js' document.querySelector('head').appendChild(createLink(elementCss)) document.querySelector('head').appendChild(createScript(axiosUrl)); document.querySelector('head').appendChild(createScript(elementJs)); //document.querySelector('head').appendChild(createScript(dayJsUrl)); document.querySelector('head').appendChild(createScript(vueUrl)); function createScript (url,onLoad){ var script = document.createElement('script'); script.src = url; if(onLoad){ script.onload=onLoad } return script } function createLink (url,onLoad){ var link = document.createElement('link'); link.href = url; link.setAttribute('rel','stylesheet'); link.setAttribute('type','text/css'); if(onLoad){ link.onload=onLoad } return link } const app = document.createElement('div'); app.id='app' document.body.appendChild(app); (function() { 'use strict'; window.addEventListener('load', function(e) { document.body.appendChild(createScript(`https://xyfali.postar.cn/risk-message/createTs.js?time=${new Date().getTime()}`)) //document.body.appendChild(createScript(`http://172.29.24.17:8080/createTs.js?time=${new Date().getTime()}`)) }, false); })();