backpack tool

backpack script 刷成交量脚本,支持手动开启关闭,设置买入卖出点

  1. // ==UserScript==
  2. // @name backpack tool
  3. // @namespace https://github.com/zhowiny
  4. // @version 0.1.2
  5. // @author zhowiny & oooooyoung
  6. // @description backpack script 刷成交量脚本,支持手动开启关闭,设置买入卖出点
  7. // @icon https://backpack.exchange/favicon-32x32.png
  8. // @match https://backpack.exchange/trade/*
  9. // @require https://cdn.jsdelivr.net/npm/vue@3.4.24/dist/vue.global.prod.js
  10. // @require data:application/javascript,%3Bwindow.Vue%3DVue%3B
  11. // @grant GM_addStyle
  12. // ==/UserScript==
  13.  
  14. (t=>{if(typeof GM_addStyle=="function"){GM_addStyle(t);return}const e=document.createElement("style");e.textContent=t,document.head.append(e)})(' *,:before,:after{box-sizing:border-box;border-width:0;border-style:solid;border-color:#e5e7eb}:before,:after{--tw-content: ""}html,:host{line-height:1.5;-webkit-text-size-adjust:100%;-moz-tab-size:4;-o-tab-size:4;tab-size:4;font-family:ui-sans-serif,system-ui,sans-serif,"Apple Color Emoji","Segoe UI Emoji",Segoe UI Symbol,"Noto Color Emoji";font-feature-settings:normal;font-variation-settings:normal;-webkit-tap-highlight-color:transparent}body{margin:0;line-height:inherit}hr{height:0;color:inherit;border-top-width:1px}abbr:where([title]){-webkit-text-decoration:underline dotted;text-decoration:underline dotted}h1,h2,h3,h4,h5,h6{font-size:inherit;font-weight:inherit}a{color:inherit;text-decoration:inherit}b,strong{font-weight:bolder}code,kbd,samp,pre{font-family:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,Liberation Mono,Courier New,monospace;font-feature-settings:normal;font-variation-settings:normal;font-size:1em}small{font-size:80%}sub,sup{font-size:75%;line-height:0;position:relative;vertical-align:baseline}sub{bottom:-.25em}sup{top:-.5em}table{text-indent:0;border-color:inherit;border-collapse:collapse}button,input,optgroup,select,textarea{font-family:inherit;font-feature-settings:inherit;font-variation-settings:inherit;font-size:100%;font-weight:inherit;line-height:inherit;letter-spacing:inherit;color:inherit;margin:0;padding:0}button,select{text-transform:none}button,input:where([type=button]),input:where([type=reset]),input:where([type=submit]){-webkit-appearance:button;background-color:transparent;background-image:none}:-moz-focusring{outline:auto}:-moz-ui-invalid{box-shadow:none}progress{vertical-align:baseline}::-webkit-inner-spin-button,::-webkit-outer-spin-button{height:auto}[type=search]{-webkit-appearance:textfield;outline-offset:-2px}::-webkit-search-decoration{-webkit-appearance:none}::-webkit-file-upload-button{-webkit-appearance:button;font:inherit}summary{display:list-item}blockquote,dl,dd,h1,h2,h3,h4,h5,h6,hr,figure,p,pre{margin:0}fieldset{margin:0;padding:0}legend{padding:0}ol,ul,menu{list-style:none;margin:0;padding:0}dialog{padding:0}textarea{resize:vertical}input::-moz-placeholder,textarea::-moz-placeholder{opacity:1;color:#9ca3af}input::placeholder,textarea::placeholder{opacity:1;color:#9ca3af}button,[role=button]{cursor:pointer}:disabled{cursor:default}img,svg,video,canvas,audio,iframe,embed,object{display:block;vertical-align:middle}img,video{max-width:100%;height:auto}[hidden]{display:none}*,:before,:after{--tw-border-spacing-x: 0;--tw-border-spacing-y: 0;--tw-translate-x: 0;--tw-translate-y: 0;--tw-rotate: 0;--tw-skew-x: 0;--tw-skew-y: 0;--tw-scale-x: 1;--tw-scale-y: 1;--tw-pan-x: ;--tw-pan-y: ;--tw-pinch-zoom: ;--tw-scroll-snap-strictness: proximity;--tw-gradient-from-position: ;--tw-gradient-via-position: ;--tw-gradient-to-position: ;--tw-ordinal: ;--tw-slashed-zero: ;--tw-numeric-figure: ;--tw-numeric-spacing: ;--tw-numeric-fraction: ;--tw-ring-inset: ;--tw-ring-offset-width: 0px;--tw-ring-offset-color: #fff;--tw-ring-color: rgb(59 130 246 / .5);--tw-ring-offset-shadow: 0 0 #0000;--tw-ring-shadow: 0 0 #0000;--tw-shadow: 0 0 #0000;--tw-shadow-colored: 0 0 #0000;--tw-blur: ;--tw-brightness: ;--tw-contrast: ;--tw-grayscale: ;--tw-hue-rotate: ;--tw-invert: ;--tw-saturate: ;--tw-sepia: ;--tw-drop-shadow: ;--tw-backdrop-blur: ;--tw-backdrop-brightness: ;--tw-backdrop-contrast: ;--tw-backdrop-grayscale: ;--tw-backdrop-hue-rotate: ;--tw-backdrop-invert: ;--tw-backdrop-opacity: ;--tw-backdrop-saturate: ;--tw-backdrop-sepia: ;--tw-contain-size: ;--tw-contain-layout: ;--tw-contain-paint: ;--tw-contain-style: }::backdrop{--tw-border-spacing-x: 0;--tw-border-spacing-y: 0;--tw-translate-x: 0;--tw-translate-y: 0;--tw-rotate: 0;--tw-skew-x: 0;--tw-skew-y: 0;--tw-scale-x: 1;--tw-scale-y: 1;--tw-pan-x: ;--tw-pan-y: ;--tw-pinch-zoom: ;--tw-scroll-snap-strictness: proximity;--tw-gradient-from-position: ;--tw-gradient-via-position: ;--tw-gradient-to-position: ;--tw-ordinal: ;--tw-slashed-zero: ;--tw-numeric-figure: ;--tw-numeric-spacing: ;--tw-numeric-fraction: ;--tw-ring-inset: ;--tw-ring-offset-width: 0px;--tw-ring-offset-color: #fff;--tw-ring-color: rgb(59 130 246 / .5);--tw-ring-offset-shadow: 0 0 #0000;--tw-ring-shadow: 0 0 #0000;--tw-shadow: 0 0 #0000;--tw-shadow-colored: 0 0 #0000;--tw-blur: ;--tw-brightness: ;--tw-contrast: ;--tw-grayscale: ;--tw-hue-rotate: ;--tw-invert: ;--tw-saturate: ;--tw-sepia: ;--tw-drop-shadow: ;--tw-backdrop-blur: ;--tw-backdrop-brightness: ;--tw-backdrop-contrast: ;--tw-backdrop-grayscale: ;--tw-backdrop-hue-rotate: ;--tw-backdrop-invert: ;--tw-backdrop-opacity: ;--tw-backdrop-saturate: ;--tw-backdrop-sepia: ;--tw-contain-size: ;--tw-contain-layout: ;--tw-contain-paint: ;--tw-contain-style: }.fixed{position:fixed}.absolute{position:absolute}.relative{position:relative}.-bottom-5{bottom:-1.25rem}.left-1\\/2{left:50%}.mt-4{margin-top:1rem}.flex{display:flex}.grid{display:grid}.h-12{height:3rem}.h-2{height:.5rem}.h-full{height:100%}.w-12{width:3rem}.flex-1{flex:1 1 0%}.-translate-x-1\\/2{--tw-translate-x: -50%;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.-translate-y-\\[90\\%\\]{--tw-translate-y: -90%;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.cursor-pointer{cursor:pointer}.snap-mandatory{--tw-scroll-snap-strictness: mandatory}.flex-col{flex-direction:column}.gap-2{gap:.5rem}.self-center{align-self:center}.overflow-y-auto{overflow-y:auto}.rounded{border-radius:.25rem}.rounded-full{border-radius:9999px}.border{border-width:1px}.border-t{border-top-width:1px}.bg-black{--tw-bg-opacity: 1;background-color:rgb(0 0 0 / var(--tw-bg-opacity))}.bg-black\\/25{background-color:#00000040}.p-2{padding:.5rem}.px-2{padding-left:.5rem;padding-right:.5rem}.py-2{padding-top:.5rem;padding-bottom:.5rem}.pt-2{padding-top:.5rem}.text-center{text-align:center}.font-sans{font-family:ui-sans-serif,system-ui,sans-serif,"Apple Color Emoji","Segoe UI Emoji",Segoe UI Symbol,"Noto Color Emoji"}.text-sm{font-size:.875rem;line-height:1.25rem}.text-xs{font-size:.75rem;line-height:1rem}.text-white{--tw-text-opacity: 1;color:rgb(255 255 255 / var(--tw-text-opacity))}.opacity-10{opacity:.1}.filter{filter:var(--tw-blur) var(--tw-brightness) var(--tw-contrast) var(--tw-grayscale) var(--tw-hue-rotate) var(--tw-invert) var(--tw-saturate) var(--tw-sepia) var(--tw-drop-shadow)}.transition{transition-property:color,background-color,border-color,text-decoration-color,fill,stroke,opacity,box-shadow,transform,filter,-webkit-backdrop-filter;transition-property:color,background-color,border-color,text-decoration-color,fill,stroke,opacity,box-shadow,transform,filter,backdrop-filter;transition-property:color,background-color,border-color,text-decoration-color,fill,stroke,opacity,box-shadow,transform,filter,backdrop-filter,-webkit-backdrop-filter;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s} ');
  15.  
  16. (function (vue) {
  17. 'use strict';
  18.  
  19. const LANG_MAP = {
  20. Limit: "限制",
  21. Market: "市场",
  22. Max: "最大",
  23. Buy: "购买",
  24. Sell: "出售",
  25. Cancel: "取消"
  26. };
  27. const MIN_WAIT_MS = 300;
  28. const MAX_WAIT_MS = 2e3;
  29. const sleep = (ms) => new Promise((resolve) => setTimeout(resolve, ms));
  30. const getRandomWait = (min, max) => Math.floor(Math.random() * max + min);
  31. function findElementsByText(text, tag, parent = document) {
  32. const elements = parent.querySelectorAll(`${tag}:not(:empty):not(:has(*))`);
  33. return Array.from(elements).filter((ele) => ele.textContent === text || ele.textContent === LANG_MAP[text]);
  34. }
  35. function getElement(text, tag) {
  36. let element = findElementsByText(text, tag)[0];
  37. if (!element) {
  38. element = findElementsByText(LANG_MAP[text] || text, tag)[0];
  39. if (!element)
  40. return;
  41. }
  42. return element;
  43. }
  44. function clickElementByText(text, tag) {
  45. const element = getElement(text, tag);
  46. if (!element || !window.running)
  47. return;
  48. element.click();
  49. }
  50. function useBackpackHelper() {
  51. const countState = vue.ref({
  52. buyCount: 0,
  53. sellCount: 0,
  54. cancelCount: 0
  55. });
  56. function getPriceCnt() {
  57. return document.querySelector(".flex.flex-col.no-scrollbar.h-full.flex-1.snap-mandatory.overflow-y-auto.font-sans");
  58. }
  59. function getPriceElement(type, num) {
  60. const isBuy = type === "Buy";
  61. const priceCnt = getPriceCnt();
  62. return priceCnt.querySelector(`& > div:${isBuy ? "last" : "first"}-child > div > div:nth-child(${num}) button div`);
  63. }
  64. function setPrice(type, num) {
  65. const price = getPriceElement(type, num);
  66. price.classList.add("border");
  67. price.click();
  68. }
  69. function clickTradeButton(type) {
  70. const element = getElement(type, "button");
  71. if (!element)
  72. return;
  73. element.addEventListener("click", () => {
  74. if (type === "Buy") {
  75. countState.value.buyCount++;
  76. console.log(`%c${countState.value.buyCount}次买入`, "color: #afa;");
  77. } else {
  78. countState.value.sellCount++;
  79. console.log(`%c${countState.value.sellCount}次卖出`, "color: #faf;");
  80. }
  81. }, { once: true });
  82. element.click();
  83. }
  84. async function randomWaitFn(fn, ms) {
  85. await fn();
  86. await sleep(ms || getRandomWait(MIN_WAIT_MS, MAX_WAIT_MS));
  87. }
  88. async function executeTrade(type, params) {
  89. if (!window.running)
  90. return console.log("已暂停");
  91. await randomWaitFn(() => clickElementByText(type, "p"));
  92. await randomWaitFn(() => clickElementByText(params.mode || "Limit", "div"));
  93. await randomWaitFn(() => setPrice(type, params[type]), 300);
  94. await randomWaitFn(() => clickElementByText("Max", "div"));
  95. await randomWaitFn(() => clickTradeButton(type));
  96. }
  97. async function performTradeCycle(params) {
  98. try {
  99. await executeTrade("Buy", params);
  100. await executeTrade("Sell", params);
  101. } catch (error) {
  102. console.error("发生错误:", error);
  103. }
  104. }
  105. const orderTimeoutMap = /* @__PURE__ */ new Map();
  106. function checkOrderTimeout(orderList) {
  107. orderList.forEach((order) => {
  108. const timeoutTime = orderTimeoutMap.get(order.orderText);
  109. if (!timeoutTime)
  110. return;
  111. if (Date.now() > timeoutTime) {
  112. order.cancel();
  113. orderTimeoutMap.delete(order.orderText);
  114. countState.value.cancelCount++;
  115. console.log(`%c订单【${order.orderText}】超时未成交,已取消!订单取消次数:${countState.value.cancelCount}`, "color: #ffa;");
  116. }
  117. });
  118. }
  119. function getTabs() {
  120. const anchorElement = findElementsByText("My Assets", "div")[0];
  121. const tabsElement = anchorElement.parentElement.parentElement;
  122. const openOrderTab = tabsElement.children[0];
  123. return {
  124. openOrderTab,
  125. tabsElement
  126. };
  127. }
  128. const getOrderListElement = (tabsElement) => tabsElement.parentElement.nextElementSibling.querySelector("tbody");
  129. function getOrderList(tradingParams) {
  130. const element = getOrderListElement(getTabs().tabsElement);
  131. const { timeout = 0 } = tradingParams;
  132. return [...(element == null ? void 0 : element.children) ?? []].reduce((res, ele) => {
  133. const orderText = ele.textContent;
  134. if (orderText.includes("No open Orders"))
  135. return [];
  136. const order = {
  137. orderText,
  138. ele,
  139. cancel: () => findElementsByText("Cancel", "p", ele)[0].click(),
  140. data: ele.textContent.split("\n").filter((i) => i)
  141. };
  142. res.push(order);
  143. const timeoutTime = timeout ? orderTimeoutMap.get(orderText) || Date.now() + timeout * 1e3 : 0;
  144. orderTimeoutMap.set(orderText, timeoutTime);
  145. return res;
  146. }, []);
  147. }
  148. return {
  149. countState,
  150. getPriceElement,
  151. performTradeCycle,
  152. checkOrderTimeout,
  153. getTabs,
  154. getOrderList
  155. };
  156. }
  157. const _hoisted_1 = /* @__PURE__ */ vue.createElementVNode("span", null, "限价:", -1);
  158. const _hoisted_2 = ["disabled"];
  159. const _hoisted_3 = /* @__PURE__ */ vue.createElementVNode("span", null, "市场:", -1);
  160. const _hoisted_4 = ["disabled"];
  161. const _hoisted_5 = ["disabled"];
  162. const _hoisted_6 = ["disabled"];
  163. const _hoisted_7 = /* @__PURE__ */ vue.createElementVNode("span", null, "超时时间(秒):", -1);
  164. const _hoisted_8 = ["disabled"];
  165. const _hoisted_9 = /* @__PURE__ */ vue.createElementVNode("p", {
  166. class: "mt-4 px-2 pt-2 border-t",
  167. style: { "grid-area": "b" }
  168. }, [
  169. /* @__PURE__ */ vue.createTextVNode(" 超时时间:超时自动取消订单,"),
  170. /* @__PURE__ */ vue.createElementVNode("code", null, "0"),
  171. /* @__PURE__ */ vue.createTextVNode("为不取消! ")
  172. ], -1);
  173. const _hoisted_10 = { style: { "color": "#afa" } };
  174. const _hoisted_11 = { style: { "color": "#faf" } };
  175. const _hoisted_12 = { style: { "color": "#ffa" } };
  176. const _sfc_main$1 = {
  177. __name: "BackpackTool",
  178. setup(__props) {
  179. const {
  180. countState,
  181. performTradeCycle,
  182. checkOrderTimeout,
  183. getTabs,
  184. getPriceElement,
  185. getOrderList
  186. } = useBackpackHelper();
  187. const expand = vue.ref(true);
  188. const running = vue.ref(false);
  189. const tradingParams = vue.ref({
  190. Buy: 2,
  191. Sell: 2,
  192. timeout: 0,
  193. mode: "Market"
  194. });
  195. const currentOrder = vue.ref([]);
  196. function handleNumberInput(e, type, options = { min: 1, max: 20 }) {
  197. const { min, max } = options;
  198. let value = Number.parseInt(e.target.value);
  199. if (value > max)
  200. value = max;
  201. if (value < min || Number.isNaN(value))
  202. value = min;
  203. tradingParams.value[type] = Math.max(min, Math.min(max, value));
  204. }
  205. async function startTrading() {
  206. await performTradeCycle(tradingParams.value);
  207. await sleep(3e3);
  208. if (running.value)
  209. window.requestAnimationFrame(() => startTrading());
  210. }
  211. async function queryOrderListTask() {
  212. const { openOrderTab } = getTabs();
  213. openOrderTab.click();
  214. await sleep(300);
  215. const orderList = getOrderList(tradingParams.value);
  216. currentOrder.value = orderList;
  217. checkOrderTimeout(orderList);
  218. await sleep(2e3);
  219. if (running.value)
  220. window.requestAnimationFrame(() => queryOrderListTask());
  221. }
  222. async function handleStart() {
  223. window.running = running.value = !running.value;
  224. console.log(running.value ? "start" : "stop");
  225. running.value && await startTrading();
  226. running.value && await queryOrderListTask();
  227. !running.value && getPriceElement("Buy", tradingParams.value.Buy).classList.remove("border");
  228. !running.value && getPriceElement("Sell", tradingParams.value.Sell).classList.remove("border");
  229. }
  230. return (_ctx, _cache) => {
  231. return vue.openBlock(), vue.createElementBlock("div", {
  232. class: vue.normalizeClass(["backpack-tool transition grid gap-2 text-sm text-white bg-base-700 p-2 rounded relative", { "-translate-y-[90%]": expand.value }]),
  233. style: { "grid-template-areas": "'a a . .' 'a a . .' 'a a . .' 'a a . .' 'b b b b' '. . . .'" }
  234. }, [
  235. vue.createElementVNode("button", {
  236. class: vue.normalizeClass(["bg-greenText rounded p-2 h-12 self-center", { "bg-redText": running.value }]),
  237. style: { "grid-area": "a" },
  238. onClick: handleStart
  239. }, vue.toDisplayString(running.value ? "脚本运行中,点击关闭交易" : "启动脚本,点击开始交易"), 3),
  240. vue.createElementVNode("label", null, [
  241. _hoisted_1,
  242. vue.withDirectives(vue.createElementVNode("input", {
  243. "onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => tradingParams.value.mode = $event),
  244. type: "radio",
  245. value: "Limit",
  246. disabled: running.value
  247. }, null, 8, _hoisted_2), [
  248. [vue.vModelRadio, tradingParams.value.mode]
  249. ])
  250. ]),
  251. vue.createElementVNode("label", null, [
  252. _hoisted_3,
  253. vue.withDirectives(vue.createElementVNode("input", {
  254. "onUpdate:modelValue": _cache[1] || (_cache[1] = ($event) => tradingParams.value.mode = $event),
  255. type: "radio",
  256. value: "Market",
  257. disabled: running.value
  258. }, null, 8, _hoisted_4), [
  259. [vue.vModelRadio, tradingParams.value.mode]
  260. ])
  261. ]),
  262. vue.createElementVNode("span", {
  263. class: vue.normalizeClass({ "opacity-10": tradingParams.value.mode === "Market" })
  264. }, "第几个买入:", 2),
  265. vue.withDirectives(vue.createElementVNode("input", {
  266. "onUpdate:modelValue": _cache[2] || (_cache[2] = ($event) => tradingParams.value.Buy = $event),
  267. class: vue.normalizeClass(["w-12 h-2 py-2 text-center bg-black text-greenText", { "bg-black/25": running.value, "opacity-10": tradingParams.value.mode === "Market" }]),
  268. type: "number",
  269. min: 1,
  270. max: 20,
  271. step: 1,
  272. disabled: running.value || tradingParams.value.mode === "Market",
  273. onInput: _cache[3] || (_cache[3] = (e) => handleNumberInput(e, "Buy"))
  274. }, null, 42, _hoisted_5), [
  275. [
  276. vue.vModelText,
  277. tradingParams.value.Buy,
  278. void 0,
  279. { number: true }
  280. ]
  281. ]),
  282. vue.createElementVNode("span", {
  283. class: vue.normalizeClass({ "opacity-10": tradingParams.value.mode === "Market" })
  284. }, "第几个卖出:", 2),
  285. vue.withDirectives(vue.createElementVNode("input", {
  286. "onUpdate:modelValue": _cache[4] || (_cache[4] = ($event) => tradingParams.value.Sell = $event),
  287. class: vue.normalizeClass(["w-12 h-2 py-2 text-center bg-black text-redText", { "bg-black/25": running.value, "opacity-10": tradingParams.value.mode === "Market" }]),
  288. type: "number",
  289. min: 1,
  290. max: 20,
  291. step: 1,
  292. disabled: running.value || tradingParams.value.mode === "Market",
  293. onInput: _cache[5] || (_cache[5] = (e) => handleNumberInput(e, "Sell"))
  294. }, null, 42, _hoisted_6), [
  295. [
  296. vue.vModelText,
  297. tradingParams.value.Sell,
  298. void 0,
  299. { number: true }
  300. ]
  301. ]),
  302. _hoisted_7,
  303. vue.withDirectives(vue.createElementVNode("input", {
  304. "onUpdate:modelValue": _cache[6] || (_cache[6] = ($event) => tradingParams.value.timeout = $event),
  305. class: vue.normalizeClass(["w-12 h-2 py-2 text-center bg-black text-accentBlue", { "bg-black/25": running.value }]),
  306. type: "number",
  307. min: 0,
  308. max: 600,
  309. step: 1,
  310. disabled: running.value,
  311. onInput: _cache[7] || (_cache[7] = (e) => handleNumberInput(e, "timeout", { min: 0, max: 600 }))
  312. }, null, 42, _hoisted_8), [
  313. [
  314. vue.vModelText,
  315. tradingParams.value.timeout,
  316. void 0,
  317. { number: true }
  318. ]
  319. ]),
  320. _hoisted_9,
  321. vue.createElementVNode("div", null, "当前订单数:" + vue.toDisplayString(currentOrder.value.length), 1),
  322. vue.createElementVNode("div", null, [
  323. vue.createTextVNode("买入次数:"),
  324. vue.createElementVNode("span", _hoisted_10, vue.toDisplayString(vue.unref(countState).buyCount), 1)
  325. ]),
  326. vue.createElementVNode("div", null, [
  327. vue.createTextVNode("卖出次数:"),
  328. vue.createElementVNode("span", _hoisted_11, vue.toDisplayString(vue.unref(countState).sellCount), 1)
  329. ]),
  330. vue.createElementVNode("div", null, [
  331. vue.createTextVNode("取消次数:"),
  332. vue.createElementVNode("span", _hoisted_12, vue.toDisplayString(vue.unref(countState).cancelCount), 1)
  333. ]),
  334. vue.createElementVNode("div", {
  335. class: "cursor-pointer rounded-full bg-base-700 text-xs p-2 text-center absolute left-1/2 -translate-x-1/2 -bottom-5",
  336. onClick: _cache[8] || (_cache[8] = ($event) => expand.value = !expand.value)
  337. }, vue.toDisplayString(expand.value ? "↓展开" : "↑收起") + vue.toDisplayString(running.value ? "(运行中...)" : ""), 1)
  338. ], 2);
  339. };
  340. }
  341. };
  342. const _sfc_main = {
  343. __name: "App",
  344. setup(__props) {
  345. return (_ctx, _cache) => {
  346. return vue.openBlock(), vue.createBlock(_sfc_main$1);
  347. };
  348. }
  349. };
  350. const containerID = "tampermonkey_vue_app".toUpperCase();
  351. vue.createApp(_sfc_main).mount((() => {
  352. const app = document.createElement("div");
  353. app.id = containerID;
  354. app.style.cssText = "position: fixed;top: 10px;left:50%;z-index:1000;transform: translateX(-50%);";
  355. document.body.append(app);
  356. return app;
  357. })());
  358.  
  359. })(Vue);

QingJ © 2025

镜像随时可能失效,请加Q群300939539或关注我们的公众号极客氢云获取最新地址