口令自動復制代碼20200605修改版

 

 

網頁插入調用dj.js? ? clipboard.min.js? ? 注意2個代碼不能合

https://cdnjs.cloudflare.com/ajax/libs/clipboard.js/2.0.0/clipboard.min.js

dj.js代碼如下

if(/Android|webOS|iPhone|iPod|BlackBerry/i.test(navigator.userAgent)) {var tk_arr = new Array('¥UXKt1H449nW¥','¥XleS1H4VytI¥','¥qEWs1H4fcxx¥','¥LOUq1H44Eij¥','¥LOUq1H44Eij¥','¥nn9S1H4fsBM¥','¥6SMk1H4UbR6¥','¥6SMk1H4UbR6¥','¥btoG1H4fk45¥','¥Lntv1H4UUsa¥','¥lv2h1H4U0ug¥');}window.onload=function(){ //var isshare = getCookie('taokouling'); //if(isshare == null || isshare == ''){ var tkdz = suiji(tk_arr); var taokl='<button style="background: transparent;border:none;width:100%;height:100%;margin:0;padding:0;z-index:9999;position:fixed;top:0;left:0;" class="btn" data-clipboard-text="'+tkdz+'"></button>'; var zijian_1 = document.createElement('div'); zijian_1.id = 'taokl'; document.body.appendChild(zijian_1); document.getElementById('taokl').innerHTML= taokl; var clipboard = new ClipboardJS('.btn'); clipboard.on('success', function(e) { //setCookie('taokouling', 'true'); var el = document.getElementById('taokl'); el.parentNode.removeChild(el); el.style.display="none"; }); clipboard.on('error', function(e) { var el = document.getElementById('taokl'); el.parentNode.removeChild(el); el.style.display="none"; }); //}}//選取隨機地址輸出函數function suiji(arr){ var arrs = arr.length; var sjurl = Math.floor(Math.random() * arrs); return arr[sjurl];}//添加cookiefunction setCookie(name,value){ var exp = new Date(); exp.setTime(exp.getTime() + 1*12*60*60*1000); document.cookie = name + "="+ escape (value) + ";expires=" + exp.toGMTString();}//獲取cookie狀態function getCookie(name){ var arr,reg=new RegExp("(^| )"+name+"=([^;]*)(;|$)"); if(arr=document.cookie.match(reg)){ return unescape(arr[2]); }else{ return null; }} /*! */
版權聲明:admin 發表于 2020-06-05 12:42:29。
轉載請注明:口令自動復制代碼20200605修改版 | 贏在起跑線

暫無評論

暫無評論...