您需要先安装一个扩展,例如 篡改猴、Greasemonkey 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 Userscripts ,之后才能安装此脚本。
您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey,才能安装此脚本。
您需要先安装用户脚本管理器扩展后才能安装此脚本。
update the data of volunteer
当前为
// ==UserScript== // @name 修改资料 // @namespace http://tampermonkey.net/ // @version 0.1.8 // @description update the data of volunteer // @author zhaiwei // @match http://ah.chinavolunteer.mca.gov.cn/subsite/anhui/* // @icon https://www.google.com/s2/favicons?sz=64&domain=mca.gov.cn // @grant none // @license GPL license // ==/UserScript== (function() { 'use strict'; // 生成“修改”按钮 var btn = document.createElement('button'); // 按钮文字 btn.innerText = '修改'; // 添加按钮的样式类名class值为changeBtn btn.setAttribute('class', 'changeBtn'); // 生成style标签 var style = document.createElement('style'); // 把样式写进去 style.innerText = `.changeBtn{position:fixed;top:80%;right:10%;width:75px;height:55px;padding:3px 5px;border:3px solid #0d6efd;cursor:pointer;color:#0d6efd;font-size:14px;background-color:transparent;border-radius:5px;transition:color .15s ease-in-out,background-color .15s ease-in-out;z-index:9999999999999;}.changeBtn:hover{background-color:#0d6efd;color:#fff;}`; // 在head中添加style标签 document.head.appendChild(style); // 在body中添加button按钮 document.body.appendChild(btn); // 点击按钮去执行修改函数 changeData document.querySelector('.changeBtn').addEventListener('click', function () { changeData(); }) // 生成"保存"按钮 var btn0 = document.createElement('button'); // 按钮文字 btn0.innerText = '保存'; // 添加按钮的样式类名class值为saveBtn btn0.setAttribute('class', 'saveBtn'); // 生成style标签 var style0 = document.createElement('style'); // 把样式写进去 style0.innerText = `.saveBtn{position:fixed;top:90%;right:10%;width:75px;height:55px;padding:3px 5px;border:3px solid #ff0033;cursor:pointer;color:#ff0033;font-size:14px;background-color:transparent;border-radius:5px;transition:color .15s ease-in-out,background-color .15s ease-in-out;z-index:9999999999999;}.saveBtn:hover{background-color:#ff0033;color:#fff;}`; // 在head中添加style标签 document.head.appendChild(style0); // 在body中添加button按钮 document.body.appendChild(btn0); // 点击按钮去执行修改函数 saveData document.querySelector('.saveBtn').addEventListener('click', function () { saveData(); }) // 生成"保存"按钮 var btn1 = document.createElement('button'); // 按钮文字 btn1.innerText = '退出'; // 添加按钮的样式类名class值为exitBtn btn1.setAttribute('class', 'exitBtn'); // 生成style标签 var style1 = document.createElement('style'); // 把样式写进去 style1.innerText = `.exitBtn{position:fixed;top:65%;right:5%;width:75px;height:55px;padding:3px 5px;border:3px solid #696969;cursor:pointer;color:#696969;font-size:14px;background-color:transparent;border-radius:5px;transition:color .15s ease-in-out,background-color .15s ease-in-out;z-index:9999999999999;}.exitBtn:hover{background-color:#696969;color:#fff;}`; // 在head中添加style标签 document.head.appendChild(style1); // 在body中添加button按钮 document.body.appendChild(btn1); // 点击按钮去执行退出函数 exitOut() document.querySelector('.exitBtn').addEventListener('click', function () { exitOut(); }) //注册(不可用)函数 function changeData(){ var event = new Event("change"); document.getElementById("politicsSelect").value="13"; document.querySelectorAll("#politicsSelect")[0].dispatchEvent(event); //$("#politicsSelect").val("13"); //$("#politicsSelect").change(); //setTimeout('document.getElementById("politicsSelect").options.selectedIndex = 13;',50); //$('i:contains("社区服务")')[0].click(); //$('i:contains("其他")')[0].click(); //$('i:contains("其他")')[1].click(); document.getElementsByClassName("checkbox-fixed")[0].children[0].click() document.getElementsByClassName("checkbox-fixed")[0].children[1].click() document.getElementsByClassName("checkbox-fixed")[1].children[2].click() document.getElementsByClassName("checkbox-fixed")[1].children[4].click() document.getElementsByClassName("checkbox-fixed")[1].children[5].click() document.getElementsByClassName("checkbox-fixed")[1].children[13].click() document.getElementsByClassName("checkbox-fixed")[2].children[20].click() //$('i:contains("默认同意")')[0].click(); document.getElementsByClassName("col v-m t-l")[0].children[0].children[1].click() //$('i:contains("默认同意")')[1].click(); document.getElementsByClassName("col v-m t-l")[1].children[0].click() //选择居住区域 setTimeout('document.querySelectorAll("#chooseLive")[0].click();',50); setTimeout('document.getElementsByClassName("category__item")[12].click()',200); setTimeout('document.getElementsByClassName("category__item")[47].click()',350); setTimeout('document.getElementsByClassName("category__item")[56].click()',500); setTimeout('document.getElementsByClassName("form t-c")[0].children[0].click()',650); setTimeout('document.getElementsByClassName("pt-30 t-c")[0].children[0].click()',850); // setTimeout('document.getElementsByClassName("swal-button swal-button--confirm")[0].click()',1700); } function saveData(){ setTimeout('document.getElementsByClassName("pt-30 t-c")[0].children[0].click()',10); // setTimeout('document.getElementsByClassName("swal-button swal-button--confirm")[0].click()',1000); } function exitOut(){ $('a:contains("退出")')[0].click(); } // Your code here... })();
QingJ © 2025
镜像随时可能失效,请加Q群300939539或关注我们的公众号极客氢云获取最新地址