这样填写网申简历!!我真的实现了海投!!我就不信找不到工作!

  • 下载油猴插件
  • 保存该脚本
    存储信息
  • 愉快使用
    在这里插入图片描述
    点击表单的空,自动呼出备选项,点选即可

源码:

// ==UserScript==
// @name         jobHelper_test
// @namespace    http://tampermonkey.net/
// @version      0.1
// @description  try to take over the world!
// @author       技术交流qq群:529528142
// @require      https://cdn.staticfile.org/jquery/1.10.2/jquery.min.js
// @require      https://code.jquery.com/ui/1.13.2/jquery-ui.js
// @match        https://*/*
// @run-at       document-idle
// ==/UserScript==



(function() {
    'use strict';
    function getElementLeft(element) {
            var actualLeft = element.offsetLeft;
            var current = element.offsetParent;

            while (current !== null) {
                actualLeft += current.offsetLeft;
                current = current.offsetParent;
            }

            return actualLeft;
        }

        function getElementTop(element) {
            var actualTop = element.offsetTop;
            var current = element.offsetParent;

            while (current !== null) {
                actualTop += current.offsetTop;
                current = current.offsetParent;
            }

            return actualTop;
        }
    var styleElement = document.createElement('style');
                styleElement.type = 'text/css';


    //styleElement.innerText = "aaaaa";
    styleElement.innerHTML = ".xxxitem{border-bottom: 1px solid;margin:5px 5px;cursor:pointer}#xxx-wrapper-box{background-color: #eef9fe;border: 1px dashed black;position: absolute;top: 10px;right: 20px;height: 70%;width:500px;z-index:9999;overflow:hidden;}"
     document.getElementsByTagName('head')[0].appendChild(styleElement);
    var wrapperInEye = false;
    var curActiveNode = null;
        var info = [
            "管理学、微观经济学、宏观经济学、管理信息系统、统计学、会计学、财务管理、市场营销、经济法、消费者行为学、国际市场营销",
            "负责公司线上端资源的销售工作,公司主要资源以广点通、智汇推、小米、360、沃门户等;实时了解行业的变化,跟踪客户的详细数据,为客户制定更完善的投放计划。",
            "负责公司业务系统的设计及改进,参与公司网上商城系统产品功能设计及实施工作。负责客户调研、客户需求分析、方案写作等工作, 参与公司多个大型电子商务项目的策划工作,担任大商集团网上商城一期建设项目经理。",
            "普通话一级甲等;\n大学英语四/六级(CET-4/6),良好的听说读写能力,快速浏览英语专业文件及书籍;\n通过全国计算机二级考试,熟练运用office相关软件。",
            "test2",
            "test2",
            "test2",
            "test2",
            "test2",
            "test2",
            "test2",
            "test2",
            "test2",
            "test2",
            "test2",
            "test2",
            "test2",
            "test2",
            "test2",
            "test2",
            "test2",
            "test2",
            "test2",
            "test2",
        ]
        var wrapperDiv = document.createElement('div');
        wrapperDiv.setAttribute('id','xxx-wrapper-box');
        wrapperDiv.style.visibility = 'hidden'
        document.body.appendChild(wrapperDiv);
        var move = document.createElement("div");
        move.style.cursor="move";
        move.setAttribute("id","move-div");
        //move.setAttribute("class","xxxitem");
        move.innerText = "鼠标放在这拖动";
        move.style.fontWeight="bolder";
        move.style.margin = "5px 5px";
        move.style.textAlign = "center";
        wrapperDiv.appendChild(move);

        // mountNode.appendChild(document.createElement('div'))
        var optionsDiv = document.createElement('div');
        //optionsDiv.setAttribute("draggable","true");

        //optionsDiv.setAttribute("id", "myself-div")
        //optionsDiv.setAttribute("class", "xxxdiv-class")
        optionsDiv.style.overflow = 'auto'
        optionsDiv.style.height = '90%'
        for (let val of info) {
            // console.log(key)
            let span = document.createElement('div')
            span.setAttribute("class", "xxxitem")
            span.innerText = val
            span.addEventListener('click', () => {
                curActiveNode.value = val
                console.log(val)
                console.log(curActiveNode)
                // curActiveNode.focus()
                let dd = document.getElementById("xxx-wrapper-box")
                dd.style.visibility = 'hidden'
                //console.log(dd.style.visibility)

            })
            optionsDiv.appendChild(span)
        }
        // optionsDiv.appendChild(ul)

        wrapperDiv.appendChild(optionsDiv)

        document.addEventListener('click', () => {
            curActiveNode = document.activeElement
            console.log(curActiveNode.tagName)

            if (curActiveNode.tagName !== "INPUT" && curActiveNode.tagName !== "TEXTAREA") {
                let dd = document.getElementById("xxx-wrapper-box")
                dd.style.visibility = 'hidden'

                return;
            }
            console.log(getElementLeft(curActiveNode), getElementTop(curActiveNode))
            let dd = document.getElementById("xxx-wrapper-box")
            if(checkVisible(dd)){
                //console.log("看得见!")
                dd.style.left = dd.style.left || `${getElementLeft(curActiveNode)}px`
                dd.style.top = dd.style.top || `${getElementTop(curActiveNode) + 50}px`
            }else{
                //console.log("看不见!")
                dd.style.left = `${getElementLeft(curActiveNode)}px`
                dd.style.top = `${getElementTop(curActiveNode) + 50}px`
            }
            dd.style.visibility = 'visible'


            // console.log()
            // var selful = document.getElementById("myself-ul")
            // if (selful) {
            //     console.log("已创建")
            //     return;
            // }
            //document.getElementById("myself-div")
            $("#xxx-wrapper-box").draggable();
            function checkVisible(elm) {
                var rect = elm.getBoundingClientRect();
                //获取当前浏览器的视口高度,不包括工具栏和滚动条
                //document.documentElement.clientHeight兼容 Internet Explorer 8、7、6、5
                var viewHeight = Math.max(document.documentElement.clientHeight, window.innerHeight);
                //bottom top是相对于视口的左上角位置
                //bottom大于0或者top-视口高度小于0可见
                return !(rect.bottom < 0 || rect.top - viewHeight >= 0);
            }
        })
    // Your code here...
})();

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包

打赏作者

星云牛马

帮到您的话,可否请我喝杯咖啡

¥1 ¥2 ¥4 ¥6 ¥10 ¥20
扫码支付:¥1
获取中
扫码支付

您的余额不足,请更换扫码支付或充值

打赏作者

实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值