新增 "集团二级类型": {
name: "GROUP_TYPE2",
default: "小微企业",
},
This commit is contained in:
42
script4-.js
Normal file
42
script4-.js
Normal file
@@ -0,0 +1,42 @@
|
||||
// ==UserScript==
|
||||
// @name Auto Click Audit Tab
|
||||
// @namespace http://tampermonkey.net/
|
||||
// @version 1.0
|
||||
// @description Automatically click the "审核建档" tab on the specified page
|
||||
// @author You
|
||||
// @match https://intraecrm.yw.zj.chinamobile.com/page/newGroupAddCustomer
|
||||
// @grant none
|
||||
// ==/UserScript==
|
||||
|
||||
(function() {
|
||||
'use strict';
|
||||
|
||||
// Function to check for the tab and click it
|
||||
function checkAndClickTab() {
|
||||
// Look for the specific tab element
|
||||
const auditTab = document.querySelector('a.tabs-inner span.tabs-title');
|
||||
|
||||
// If the tab exists and has the correct text
|
||||
if (auditTab && auditTab.textContent.trim() === '审核建档') {
|
||||
// Click the parent <a> element
|
||||
auditTab.closest('a.tabs-inner').click();
|
||||
console.log('Successfully clicked the "审核建档" tab');
|
||||
}
|
||||
}
|
||||
|
||||
// Wait for the page to load completely
|
||||
window.addEventListener('load', function() {
|
||||
// Also use a small delay to ensure elements are rendered
|
||||
setTimeout(checkAndClickTab, 1000);
|
||||
});
|
||||
|
||||
// In case the page content loads dynamically, check periodically
|
||||
const interval = setInterval(function() {
|
||||
checkAndClickTab();
|
||||
}, 2000);
|
||||
|
||||
// Stop checking after 30 seconds to avoid infinite loops
|
||||
setTimeout(function() {
|
||||
clearInterval(interval);
|
||||
}, 30000);
|
||||
})();
|
||||
Reference in New Issue
Block a user