您需要先安装一个扩展,例如 篡改猴、Greasemonkey 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 Userscripts ,之后才能安装此脚本。
您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey,才能安装此脚本。
您需要先安装用户脚本管理器扩展后才能安装此脚本。
copy last additional comment and post again by double clicking
// ==UserScript== // @name Last Commment // @namespace http://tampermonkey.net/ // @version 1.1 // @license MIT // @description copy last additional comment and post again by double clicking // @author You // @match https://ironbow.servicenowservices.com/sn_customerservice_case_list.do?* // @icon https://www.google.com/s2/favicons?sz=64&domain=servicenowservices.com // @grant none // ==/UserScript== (function() { 'use strict'; var additionalComments = document.querySelectorAll('td.vt[data-original-title*="2024"]'); document.querySelectorAll('td.vt[data-original-title*="2024"]').forEach((el, i) => { additionalComments[i].onclick = event => { if (event.detail === 2) { // it was a double click console.log("double"); console.log(additionalComments[1].dataset.originalTitle); setTimeout(function(){ console.log(document.getElementById("cell_edit_value").value=additionalComments[i].dataset.originalTitle); let text = additionalComments[i].dataset.originalTitle; let result = text.indexOf("(Additional comments)"); let result1 = text.indexOf("\n2024",50); let string = text.slice(result+22,result1-1); document.getElementById("cell_edit_value").value=string; //text.split('(Additional comments)'); document.getElementById("demo").innerHTML = string; }, 1000); setTimeout(function(){ //document.getElementsByClassName("btn btn-icon icon-check-circle color-green")[0].click(); }, 1000); } }; } ) // Your code here... })();