您需要先安装一个扩展,例如 篡改猴、Greasemonkey 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 Userscripts ,之后才能安装此脚本。
您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey,才能安装此脚本。
您需要先安装用户脚本管理器扩展后才能安装此脚本。
try to take over the world!
当前为
// ==UserScript== // @name 自动加收货人名 // @namespace http://tampermonkey.net/ // @version 2.1 // @description try to take over the world! // @author You // @match https://pdropship.jd.com/orderManage/initListPage // @grant none // ==/UserScript== (function() { 'use strict'; var anniu=`<button type="button" id="add_name"class="pui-button ui-widget ui-state-default ui-corner-all pui-button-text-icon-left" role="button" aria-disabled="false"> <span class="pui-button-icon-left ui-icon ui-icon-key"></span> <span class="pui-button-text">添加收货人</span> </button>` var kefu = "涵"; var timer3 = ""; var ccc='' timer3=setInterval(func1,1000) function func1() { if( $(".pui-dialog-buttonpane").length>7){ clearInterval(timer3) console.log("找到了了") $(".pui-dialog-buttonpane").eq(5).append(anniu) } $("#add_name").click(function(){ var user='1' var remark= $('#addRemark').val() var _id= $("#tr_1").text() $.get("https://pdropship.jd.com/outBound/outboundList?orderIdList=&orderId="+_id,function(data){ user=data.rows[0].customerName let pinming=data.rows[0].orderDetailList[0].wareName.indexOf("桌垫") //如果大于0 就是桌垫 if(pinming>=0){ if( $('#addRemark').val().indexOf("桌垫可定制:")>0){ let bz= $('#addRemark').val() let shan_zd= bz.replace("桌垫可定制:",'').replace(kefu,'').replace(user,'').replace(',',''); $('#addRemark').val(shan_zd) }else{ $('#addRemark').val(user+',桌垫可定制:'+remark+' '+kefu) } }else{ if( $('#addRemark').val().indexOf("可定制:")>0){ let bz= $('#addRemark').val() let shan_zd= bz.replace("可定制:",'').replace(kefu,'').replace(user,'').replace(',',''); $('#addRemark').val(shan_zd) }else{ $('#addRemark').val(user+',可定制:'+remark+' '+kefu) } } console.log(user) }) }) } // Your code here... })();