您需要先安装一个扩展,例如 篡改猴、Greasemonkey 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 Userscripts ,之后才能安装此脚本。
您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey,才能安装此脚本。
您需要先安装用户脚本管理器扩展后才能安装此脚本。
快速打标
// ==UserScript== // @name 在线咨询自动打标 // @namespace http://tampermonkey.net/ // @version 0.1 // @description 快速打标 // @author NBXX // @license MIT // @match https://integration.chinaunicom.cn:36601/bos/control/?source=oa#/historicalConversation* // @grant GM_xmlhttpRequest // ==/UserScript== (function() { 'use strict'; function getGroupIdFromUrl() { const url = window.location.href; const match = url.match(/id=(\w+)&/); if (match && match[1]) { return match[1]; } return null; } function sendLabelRequest(groupId, labelId) { GM_xmlhttpRequest({ method: "POST", url: "https://integration.chinaunicom.cn:36601/ultra-bos-history-group-serving/group/history/label/create", headers: { "Content-Type": "application/json" }, data: JSON.stringify({ groupId: groupId, labelId: labelId }), onload: function(response) { console.log(response.responseText); } }); } function createButton(labelId, text) { const groupId = getGroupIdFromUrl(); if (!groupId) return; const button = document.createElement('span'); button.setAttribute('data-v-caacb5ba', ''); button.setAttribute('class', 'el-tooltip last_label'); button.setAttribute('tabindex', '0'); button.innerText = text; button.addEventListener('click', function() { sendLabelRequest(groupId, labelId); }); return button; } const labels = [ {id: "39380522", text: "移网在途0Y"}, {id: "39375030", text: "固网在途0Y"}, {id: "39374846", text: "移网需求类查询"}, {id: "39425777", text: "数据查询提取"}, {id: "39425775", text: "移网业务办理不了解"}, {id: "41585031", text: "固网咨询操作类"} ]; function addButtonToTarget() { const target = document.querySelector('#historicalConversation > div.cbg_rightcontent > div > div.cbg_histCleft.p16 > div.cov_label'); if (target) { labels.forEach(label => { const button = createButton(label.id, label.text); target.parentNode.insertBefore(button, target.nextSibling); }); } } // Use MutationObserver to detect changes in the DOM const observer = new MutationObserver((mutationsList, observer) => { for(let mutation of mutationsList) { if (mutation.type === 'childList') { addButtonToTarget(); } } }); observer.observe(document.body, { attributes: false, childList: true, subtree: true }); })();
QingJ © 2025
镜像随时可能失效,请加Q群300939539或关注我们的公众号极客氢云获取最新地址