您需要先安装一个扩展,例如 篡改猴、Greasemonkey 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 Userscripts ,之后才能安装此脚本。
您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey,才能安装此脚本。
您需要先安装用户脚本管理器扩展后才能安装此脚本。
拷贝bugly中的"出错堆栈"
// ==UserScript== // @name bugly-copy // @namespace http://tampermonkey.net/ // @version 2025-08-19 // @description 拷贝bugly中的"出错堆栈" // @author noname // @license MulanPSL-2.0 // @match https://bugly.qq.com/v2/crash-reporting/crashes/*/* // @icon https://www.google.com/s2/favicons?sz=64&domain=qq.com // @grant GM_setClipboard // ==/UserScript== (function() { 'use strict'; const buttonStyle = ` background-color: #4CAF50; color: white; border: none; padding: 5px 10px; text-align: center; text-decoration: none; display: inline-block; font-size: 14px; margin: 4px 2px; cursor: pointer; z-index: 999; position: absolute; right: 2rem; top: 26rem; border-radius: 4px;`; const setup = () => { const container = document.querySelector('div.marginbottom20'); if (!container) { console.log('no div container'); return; } const title = container.firstChild; if (!title) { console.log('no div title'); return; } const switchDiv = title.querySelector('div.switch'); if (!switchDiv) { console.log('no div swith'); return; } const copy = () => { const titleLines = Array.from(title.querySelector('div:nth-child(2) > div').childNodes); const titleContent = titleLines.map(e => e.textContent).join('\n'); const body = container.lastChild; const bodyLines = Array.from(body.firstChild.childNodes).map(e => e.querySelector('div > div:nth-child(2)').textContent); const bodyContent = bodyLines.join('\n'); const text = `${titleContent}\n${bodyContent}`; GM_setClipboard(text, 'text', () => console.debug("Clipboard set!")); }; const btn = document.createElement('button'); btn.textContent = '复制'; btn.className = 'copy-btn'; btn.addEventListener('click', copy); btn.style = buttonStyle; document.body.appendChild(btn); }; setTimeout(setup, 3000); })();