您需要先安装一个扩展,例如 篡改猴、Greasemonkey 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 Userscripts ,之后才能安装此脚本。
您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey,才能安装此脚本。
您需要先安装用户脚本管理器扩展后才能安装此脚本。
Fake the platform property on 'navigator' to convince Onshape it's running under Windows. This causes it to ask for information on https://127.51.68.120:8181/3dconnexion/nlproxy so that a 3d mouse can be connected.
当前为
- // ==UserScript==
- // @name Onshape 3D‑Mouse on Linux (in‑page patch)
- // @description Fake the platform property on 'navigator' to convince Onshape it's running under Windows. This causes it to ask for information on https://127.51.68.120:8181/3dconnexion/nlproxy so that a 3d mouse can be connected.
- // @match https://cad.onshape.com/documents/*
- // @run-at document-start
- // @grant none
- // @version 0.0.1
- // @license MIT
- // @namespace https://greasyfork.org/users/1460506
- // ==/UserScript==
- Object.defineProperty(Navigator.prototype, 'platform', {
- get: () => 'Win32'
- });
- console.log('[Onshape patch] navigator.platform →', navigator.platform);