修改资料

update the data of volunteer

当前为 2023-02-13 提交的版本,查看 最新版本

// ==UserScript==
// @name         修改资料
// @namespace    http://tampermonkey.net/
// @version      0.1.1
// @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:50%;left:25%;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();
    })


    //注册(不可用)函数
    function changeData(){

    document.getElementById("politicsSelect").options.selectedIndex = 13;
    $('i:contains("社区服务")')[0].click();
    $('i:contains("其他")')[0].click();
    $('i:contains("其他")')[1].click();

    $('i:contains("默认同意")')[0].click();

    $('i:contains("默认同意")')[1].click();
    //选择居住区域
    setTimeout('document.querySelectorAll("#chooseLive")[0].click();',100);
    setTimeout('document.getElementsByClassName("category__item")[12].click()',300);
    setTimeout('document.getElementsByClassName("category__item")[47].click()',500);
    setTimeout('document.getElementsByClassName("category__item")[56].click()'.click(),700);
    setTimeout('document.getElementsByClassName("form t-c")[0].children[0].click()',900);

    setTimeout('document.getElementsByClassName("pt-30 t-c")[0].children[0].click()',1100);
    //
    setTimeout('document.getElementsByClassName("swal-button swal-button--confirm")[0].click()',1300)
    }

   
    // Your code here...
})();

QingJ © 2025

镜像随时可能失效,请加Q群300939539或关注我们的公众号极客氢云获取最新地址