您需要先安装一个扩展,例如 篡改猴、Greasemonkey 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 Userscripts ,之后才能安装此脚本。
您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey,才能安装此脚本。
您需要先安装用户脚本管理器扩展后才能安装此脚本。
Helps with WooCommerce
当前为
// ==UserScript== // @name init Lab Shop helper // @namespace https://gitlab.com/user890104 // @version 2025-10-18.00 // @description Helps with WooCommerce // @author Vencislav Atanasov // @license MIT // @match https://shop.initlab.org/wp-admin/admin.php* // @icon https://www.google.com/s2/favicons?sz=64&domain=initlab.org // @grant unsafeWindow // @grant GM.xmlHttpRequest // ==/UserScript== (function() { 'use strict'; const url = localStorage.getItem('cash-register-url') ?? 'http://10.95.0.10:8080/jsonrpc'; const search = new URLSearchParams(location.search.substring(1)); if (search.get('action') === 'init_lab_shop_cash_register_payment') { unsafeWindow.cashRegisterRequest = async function(body = {}) { const response = await GM.xmlHttpRequest({ url, method: 'POST', headers: { 'Content-Type': 'application/json; charset=utf-8', }, data: JSON.stringify(body), }); return JSON.parse(response.responseText); }; } })();