您需要先安装一个扩展,例如 篡改猴、Greasemonkey 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 Userscripts ,之后才能安装此脚本。
您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey,才能安装此脚本。
您需要先安装用户脚本管理器扩展后才能安装此脚本。
7/9/2025, 8:44:53 AM
// ==UserScript== // @name Jira Service Desk - Default Reply to Customer // @namespace comrads.default.reply.to.customer // @match https://*.atlassian.net/* // @grant none // @version 1.0 // @author Ré Schopmeijer // @description 7/9/2025, 8:44:53 AM // @license MIT // ==/UserScript== // Function lifted from: https://medium.com/@ryan_forrester_/javascript-wait-for-element-to-exist-simple-explanation-1cd8c569e354 function waitForElement(selector, callback) { const observer = new MutationObserver((mutations, observer) => { const element = document.querySelector(selector); if (element) { observer.disconnect(); callback(element); } }); observer.observe(document.body, { childList: true, subtree: true, }); } waitForElement("#comment-container", (element) => { waitForElement("#issue-transition-comment-editor-container-tabs-1", (el) => { const secondCommentTabText = el.querySelector('span').innerText; if (secondCommentTabText === 'Reply to customer') { el.click(); } }) });