您需要先安装一个扩展,例如 篡改猴、Greasemonkey 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 Userscripts ,之后才能安装此脚本。
您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey,才能安装此脚本。
您需要先安装用户脚本管理器扩展后才能安装此脚本。
Highliht diff in Jira issue history.
当前为
// ==UserScript== // @name Jira history diff // @version 2024-09-06 // @description Highliht diff in Jira issue history. // @author vctls // @match https://*.atlassian.net/* // @icon https://www.google.com/s2/favicons?sz=64&domain=atlassian.net // @grant none // @require https://cdn.jsdelivr.net/gh/google/diff-match-patch@62f2e689f498f9c92dbc588c58750addec9b1654/javascript/diff_match_patch_uncompressed.js // @license MIT // @namespace https://gf.qytechs.cn/users/299396 // ==/UserScript== (function() { 'use strict'; const handleMessage = () => { // TODO Handle history entries that contain multiple changes. const descChanges = document.querySelectorAll('[data-testid="issue-history.ui.history-items.history-item.rich-text-history-item.history-item"] > div:last-child > div:last-child > div'); descChanges.forEach((element, index) => { if (element.dataset.diffed) return; const right = element; const left = descChanges[index + 1]; if (!left || !right) return; element.style.display = "block"; const dmp = new diff_match_patch(); const diff = dmp.diff_main(left.innerText, right.innerText); dmp.diff_cleanupSemantic(diff); element.innerHTML = dmp.diff_prettyHtml(diff); element.dataset.diffed = true; }); }; let timeoutId; const delayedHandler = () => { clearTimeout(timeoutId); timeoutId = setTimeout(() => handleMessage(), 10); }; (new MutationObserver(delayedHandler)).observe(document, {childList: true, subtree: true}); })();
QingJ © 2025
镜像随时可能失效,请加Q群300939539或关注我们的公众号极客氢云获取最新地址