// ==UserScript== // @name 企查查 // @namespace http://tampermonkey.net/ // @version 0.6.6 // @description 企查查获取企业地址,法人名称和联系电话 // @author Ying // @match https://www.qcc.com/web/* // @grant GM_setClipboard // @license MIT // @downloadURL none // ==/UserScript== javascript: (function() { $('.clearfix').css({"display":"none"}); var tel = document.createElement("input"); tel.setAttribute("name","number"); tel.setAttribute("id","jobs"); tel.setAttribute("value","获取地址"); tel.setAttribute("style","width:130px;height:45px;line-height:43px;box-sizing:border-box;vertical-align:middle;font-size:16px;font-weight:500;text-align:center;background:#5dd5c8;color:white;"); $('.npanel-heading').append(tel); tel.onclick=function(){ var nr = document.getElementsByClassName("relate-info")[0]; var nt = nr.getElementsByClassName("rline")[2]; var pt = nt.getElementsByTagName("span")[0]; var pp = pt.getElementsByClassName("copy-value")[0].innerText; GM_setClipboard(pp); console.log(pp) }; var nam = document.createElement("input"); nam.setAttribute("name","number"); nam.setAttribute("id","jobs"); nam.setAttribute("value","获取联系人"); nam.setAttribute("style","width:130px;height:45px;line-height:43px;box-sizing:border-box;vertical-align:middle;font-size:16px;font-weight:500;text-align:center;background:#5dd5c8;color:white;"); $('.npanel-heading').append(nam); nam.onclick=function(){ var nr = document.getElementsByClassName("relate-info")[0]; var nt = nr.getElementsByClassName("rline")[0]; var pt = nt.getElementsByClassName("f")[0]; var pp = pt.getElementsByClassName("val")[0].innerText; GM_setClipboard(pp); console.log(pp) }; var phone = document.createElement("input"); phone.setAttribute("name","number"); phone.setAttribute("id","jobs"); phone.setAttribute("value","获取电话"); phone.setAttribute("style","width:130px;height:45px;line-height:43px;box-sizing:border-box;vertical-align:middle;font-size:16px;font-weight:500;text-align:center;background:#5dd5c8;color:white;"); $('.npanel-heading').append(phone); phone.onclick=function(){ var nr = document.getElementsByClassName("relate-info")[0]; var nt = nr.getElementsByClassName("rline")[1]; var pt = nt.getElementsByClassName("f")[0]; var pp = pt.getElementsByClassName("val")[0].innerText; GM_setClipboard(pp); console.log(pp) }; })();