// ==UserScript== // @name PHS优化0.3 // @icon http://yy.boloni.cn/cm/images/favicon.ico // @namespace http://tampermonkey.net/ // @version 0.3 // @description 按钮 // @author HEBI VISION // @match *://phs.boloni.cn/phs/* // @match *://www.kujiale.com/pub/site/design-zone/boloni/* // @exclude *://phs.boloni.cn/phs/agentSpecialOrderPage.action // @exclude *://phs.boloni.cn/phs/productMaterialInfoGroupQueryPage.action // @exclude *://phs.boloni.cn/phs/saveAgentSpecialOrderPage.action // @exclude *://phs.boloni.cn/phs/productMaterialInfoGroupQueryPage.action?_id* // @exclude *://phs.boloni.cn/phs/designlandPointsShopPage.action // @exclude *://phs.boloni.cn/phs/editAgentSpecialOrderPage.action?pid* // @exclude *://phs.boloni.cn/phs/viewAgentSpecialOrderPage.action?pid* // @grant GM_addStyle // @downloadURL none // ==/UserScript== window.setTimeout(function () { document.querySelector("body > div.index-wrap > div:nth-child(1) > div.index-content-half-wrap.pr5 > div > div.index-section-scroll-box.site-map-items-list > dl:nth-child(5) > dd > span:nth-child(4) > a").click(); },200); //=========以上一个是自动进入我的订单页面 (function() { 'use strict'; // 使用document.querySelectorAll选择要删除的元素 const elementsToRemove1 = document.querySelectorAll('body > div.query_div > div.query_condition_div > div:nth-child(1) > div:nth-child(1)'); const elementsToRemove2 = document.querySelectorAll('body > div.query_div > div.query_condition_div > div:nth-child(1) > div:nth-child(2)'); // 遍历并删除第一个选择的元素集合中的元素 elementsToRemove1.forEach(function(element) { element.parentNode.removeChild(element); }); // 遍历并删除第二个选择的元素集合中的元素 elementsToRemove2.forEach(function(element) { element.parentNode.removeChild(element); }); })(); (function() { 'use strict'; // 使用document.querySelector获取符合选择器规则的input元素 const targetInput = document.querySelector('body > div.query_div > div.query_condition_div > div:nth-child(1) > div:nth-child(4) > input'); if (targetInput) { // 如果元素存在,则设置其宽度样式为500px targetInput.style.width = '500px'; } })();