您需要先安装一个扩展,例如 篡改猴、Greasemonkey 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 Userscripts ,之后才能安装此脚本。
您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey,才能安装此脚本。
您需要先安装用户脚本管理器扩展后才能安装此脚本。
Improve the format of change request descriptions on Spark NZ ServiceNow page
// ==UserScript== // @name Better Change Request Format for Spark NZ ServiceNow // @namespace http://tampermonkey.net/ // @version 1.2 // @description Improve the format of change request descriptions on Spark NZ ServiceNow page // @author chaoscreater // @match https://sparknz.service-now.com/sp?id=approval* // @grant none // ==/UserScript== (function() { 'use strict'; // Keywords to be bolded const keywordsToBold = [ "Summary Description of Change:", "Business and technical impact if change rejected:", "Business and technical impact if change fails:", "Business Impact during change (What services will not be available to users?)", "Technical Risk: Describe any risks associated with the Change and mitigation steps", "Reason for Change:", "Change Background:", "Risk and Impact Analysis :", "Planned Start Date :", "Planned End Date :", "Business Impact during change", "Short Description", "Customer Impact:", "Justification :", "Technical Risk:", "Description :", "Company :", "Risk :", "Impact :" ]; // Function to bold keywords function boldKeywords() { const elements = document.querySelectorAll('.panel-body'); // Selecting the panel-body elements elements.forEach(element => { keywordsToBold.forEach(keyword => { const regex = new RegExp(`(${keyword})`, 'g'); element.innerHTML = element.innerHTML.replace(regex, '<br><strong>$1</strong>'); }); }); } // Run the function to bold keywords after a slight delay setTimeout(boldKeywords, 600); // Adjust the delay time as needed // Function to add line breaks around specific keywords function addLineBreaks() { const elements = document.querySelectorAll('.panel-body'); // Selecting the panel-body elements elements.forEach(element => { const htmlContent = element.innerHTML; const updatedContent = htmlContent.replace(/==============================================|____________________________________________________________________________|---------------------------------------------------------------------/g, '<br>$&<br>'); element.innerHTML = updatedContent; }); } // Run the function to add line breaks after a slight delay setTimeout(addLineBreaks, 600); // Adjust the delay time as needed })();
QingJ © 2025
镜像随时可能失效,请加Q群300939539或关注我们的公众号极客氢云获取最新地址