text: /**
  宠汪汪强制为别人助力（助力一个好友你自己可以获得30积分，一天上限是帮助3个好友，自己获得90积分，不管助力是否成功，对方都会成为你的好友）
  更新地址：https://raw.githubusercontent.com/lxk0301/scripts/master/jd_joy_help.js
  更新时间：2020-08-28
  目前提供了304位好友的friendPin供使用。脚本随机从里面获取一个，助力成功后，退出小程序重新点击进去开始助力新的好友
  欢迎大家使用 https://jdjoy.jd.com/pet/getFriends?itemsPerPage=20&currentPage=1 (currentPage=1表示第一页好友，=2表示第二页好友)
  提供各自账号列表的friendPin给我
  如果想设置固定好友，那下载下来放到本地使用，可以修改friendPin换好友(助力一好友后，更换一次friendPin里面的内容)
  感谢github @Zero-S1提供
  使用方法：
  ①设置好相应软件的重写
  ②从京东APP宠汪汪->领狗粮->邀请好友助力，分享给你小号微信或者微信的文件传输助手。 自己再打开刚才的分享，助力成功后，退出小程序重新进去刚才分享的小程序即可
  ③如提示好友人气旺，说明此好友已满了三人助力，需重新进出小程序，重新进入来客有礼-宠汪汪。
  [MITM]
  hostname = draw.jdfcloud.com
  surge
  [Script]
  宠汪汪强制为别人助力= type=http-request,pattern=(^https:\/\/draw\.jdfcloud\.com\/\/pet\/enterRoom\?reqSource=weapp&invitePin=.*+(&inviteSource=task_invite&shareSource=\w+&inviteTimeStamp=\d+&openId=\w+)?|^https:\/\/draw\.jdfcloud\.com\/\/pet\/helpFriend\?friendPin),requires-body=1,max-size=0,script-path=https://raw.githubusercontent.com/lxk0301/scripts/master/jd_joy_help.js
  
  圈x
  [rewrite_local]
  ^https:\/\/draw\.jdfcloud\.com\/\/pet\/enterRoom\?reqSource=weapp&invitePin=.*+(&inviteSource=task_invite&shareSource=\w+&inviteTimeStamp=\d+&openId=\w+)?|^https:\/\/draw\.jdfcloud\.com\/\/pet\/helpFriend\?friendPin url script-request-header https://raw.githubusercontent.com/lxk0301/scripts/master/jd_joy_help.js
  
   LOON：
  [Script]
  http-request ^https:\/\/draw\.jdfcloud\.com\/\/pet\/enterRoom\?reqSource=weapp&invitePin=.*+(&inviteSource=task_invite&shareSource=\w+&inviteTimeStamp=\d+&openId=\w+)?|^https:\/\/draw\.jdfcloud\.com\/\/pet\/helpFriend\?friendPin script-path=https://raw.githubusercontent.com/lxk0301/scripts/master/jd_joy_help.js
  , requires-body=true, timeout=10, tag=宠汪汪强制为别人助力
  
  
  你也可从下面链接拿好友的friendPin(复制链接到有京东ck的浏览器打开即可)
  
  https://jdjoy.jd.com/pet/getFriends?itemsPerPage=20&currentPage=1
  **/
  let url = $request.url
  const friendsArr = ["jd_136833sjn","jd_131335rbv","jd_4f044bdd67a3f","jd_176968gwf","jd_136744uks","jd_139559isq","jd_151698nhe","jd_182775ekl","jd_139643ldl","jd_159166edm","jd_157100apb","jd_131843tvo","jd_152554vhs","jd_134283prpb","jd_139988mgfo","jd_133590dtg","jd_63636969e55cb","jd_135565fsg","jd_189071npd","jd_138430zvw","jd_139582hlp","jd_815411720","jd_157642zjc","jd_177753pzb","jd_137918wwl","jd_188675alaf","jd_186718otu","jd_139139bew","jd_180436ggd","jd_52315d900a88a","jd_137689rjx","jd_151106nxb","jd_153879dzp","jd_185840vwq","jd_6194e9ae2cebf","jd_186221rph","jd_153810ylu","jd_189288egp","jd_158791okv","jd_139132erd","jd_159304acn","jd_138899zum","jd_187182akf","jd_136324bjqi","jd_131616wdo","jd_155384iof","jd_186326vtm","jd_zoezhu","jd_135075ahc","jd_138141ill","jd_139773zbm","jd_158416jwas","jd_182328ujc","jd_135999wrw","jd_181325tmk","jd_188254zgv","jd_3712425","jd_153711hhx","jd_176020ylg","jd_136436iuk","jd_180430yxp","jd_159958jmr","jd_155382wjy","jd_135819ueh","jd_132125ish","jd_181196mrhz","jd_138403wnm","jd_181568lrk","jd_155785zic","jd_150712koi","jd_137012gwu","jd_137638siy","jd_183011sph","jd_158224asm","jd_1652541161","jd_137332lgt","jd_181991fgs","jd_189347opuc","jd_181898rlw","jd_136526chs","jd_152616rsg","jd_151410rti","jd_139657jxa","jd_187978fdq","jd_136039csx","jd_186029urn","jd_138681pjy","jd_138204hpd","jd_138246wgz","jd_131177aol","jd_182100ofj","jd_282335851","jd_180210xwj","jd_139400bou","jd_189751xfv","jd_133781olg","jd_155229qbl","jd_dady_a","jd_183890opj","jd_136830xsh","jd_138731rkth","jd_135476kin","jd_3302023","jd_suns932","jd_158958xju","jd_688050784","jd_177467uaf","jd_138950cao","jd_181726mer","jd_138194nvx","jd_2010wwk","jd_139295gxw","jd_173931eeb","jd_189713iss","jd_139894msf","jd_158767vct","jd_159210nml","jd_133230bpy","jd_150771igh","jd_4c9dced2ff301","jd_133025pjb","jd_184751jlf","jd_139379bhj","jd_4900071","jd_137188nnv","jd_153678kxr","jd_6b04334c27336","jd_185217cfd","jd_155892hhe","jd_gxq721","jd_duqing821","jd_185087idh","jd_181528ojs","jd_136778wigm","jd_137903zfgq","jd_134785qjj","jd_159536nii","jd_188492aqx","jd_152226ypk","jd_183815eio","jd_139250pva","jd_151739nli","jd_135202pbl","jd_138201yhi","jd_137642nzw","jd_136600ysr","jd_138220eom","jd_178595cqf","jd_186682kjk","jd_136205srq","jd_138820xtj","jd_152322tkj","jd_150225ipi","jd_133287tje","jd_guba01","jd_187568qui","jd_158753hfl","jd_159816boe","jd_139297psw","jd_138564ibo","jd_188105wjm","jd_180199ekd","jd_134164zgp","jd_181547miy","jd_137030gdm","jd_183197ekf","jd_155187jhm","jd_158363nbzh","jd_151335bxo","jd_139616ywb","jd_156600kfm","jd_352215391","jd_620475312","jd_137997ole","jd_186060jol","jd_7824770b3d748","jd_6b8ba51989353","jd_152712oax","jd_177413lgq","jd_134172lqw","jd_135035dya","jd_135388arv","jd_135013mbs","jd_150897xln","jd_133827ois","jd_133307ffi","jd_138326tzrx","jd_186639utz","jd_Thin779","jd_137173yni","jd_159843fjq","jd_152590bui","jd_180225wpx","jd_187579piq","jd_156758shb","jd_139960nex","jd_138817fsp","jd_181696mtg","jd_137911aamo","jd_135891nxk","jd_177761izc","jd_153337fyq","jd_114559761","jd_Xsgfsj","jd_139965zpe","jd_185459vvx","jd_189214its","jd_151615dmb","jd_138460bsc","jd_138618yqc","jd_187290mur","jd_151318bht","jd_155344pmg","jd_137302fjz","jd_182505eyw","jd_136416nan","jd_151651ncw","jd_137131dya","jd_133471mru","jd_181116wrh","jd_139819ahg","jd_138219eja","jd_136695iqb","jd_158215wjb","jd_107071797","jd_155664eni","jd_182384yok","jd_139611sco","jd_157652hlh","jd_137036vhs","jd_188476ctf","jd_178651ldby","jd_158107bvn","jd_150342aox","jd_150283rncu","jd_131367qhs","jd_133052bem","jd_189317gau","jd_134186sbh","jd_138637pbp","jd_glwang2","jd_189557iiq","jd_138906xlbm","jd_152360yuk","jd_134551yla","jd_135832apl","jd_155448yab","jd_138388paz","jd_1352513187","jd_135464sqz","jd_153298yxo","jd_139208nicz","jd_136608wyr","jd_133053kbn","jd_135034bbx","jd_2133952","jd_187382exm","jd_135063kvb","jd_130844lme","jd_137295ajrg","jd_136810xds","jd_182771zcmi","jd_qwertag13568370gf","jd_189200fiu","jd_159871grf","jd_q105946","jd_182028tnj","jd_153718opj","jd_136850dhv","jd_159162dxb","jd_155267dkh","jd_152763ghe","jd_137104jyuf","jd_136426poa","jd_153920qlg","jd_159715spj","jd_135772nxy","jd_321051","jd_fanm537","jd_137104vuum","jd_177212uid","jd_150312pgc","jd_152569xgz","jd_136994ddl","jd_186223kew","jd_139779ovt","jd_181193dok","jd_189461sem","jd_138245yum","jd_134136kgip","jd_189543hpt","jd_132180xif","jd_182857oox","jd_186245aal","jd_3555750","jd_188502cqy","jd_186910cwu","jd_182829qbch","jd_182297xcme","jd_159708cng","jd_133330ift","jd_131904zwu","jd_182801xpy","jd_150075wud","jd_156874jup","jd_189964qzl","jd_158132cle","jd_sun723","jd_182176mee","jd_188503acjo","jd_158537jdm","jd_159485zvu","jd_180011ejj","jd_135829xzp","jd_136921jpe","jd_152629pmx","jd_189710eck","jd_189397oeo","jd_189592sul","jd_150576adh","jd_159411rzd","jd_134601izn","jd_180053tsa","jd_138226cmgb","jd_183757gbgp","jd_139289bij","jd_lx_a","jd_138562oek","jd_183691xyg","jd_151429qhv","jd_139804lhb","jd_136042bzg","jd_138102ldq","jd_135986nkf","jd_truman","jd_181700kju","jd_151064dhx","jd_150907ahj","jd_186652jxh","jd_418fef3fab12f","jd_159527gqz","jd_138237dcn","jd_134119thub","jd_wrrr0","jd_180498ozp","jd_138531irs","jd_131136fru","jd_185228tkh","jd_131910jzm","jd_151063mhz","jd_58096918e5234","jd_187187rvl","jd_157537jpe","jd_6cebe25400109","jd_1175189","jd_42a743e0b8651","jd_153063yds","jd_177692lwq","jd_152020gzy","jd_138898puv","jd_155525lpff","jd_151123xea","jd_2672389178","jd_178258cff","jd_158191ansh","jd_153280zoy","jd_hl31450","jd_150416qyl","jd_152315mcm","jd_135648axo","jd_4cfd4439d158f","jd_134815cgd","jd_135087ela","jd_180921pam","jd_135610gth","jd_156973ipc","jd_188112gxw","jd_188110wps","jd_173589vmd","jd_135604ngz","jd_158219erd","jd_158449aru","jd_166312hcv","jd_151360sty","jd_183282vqt","jd_139208bac","jd_139276cex","jd_626010305","jd_158181bbe","jd_134339ytdb","jd_139206mkrh","jd_181579uxd","jd_137015nmi","jd_511064173","jd_182924yvbk","jd_137378axvd","jd_157351ype","jd_135161rmsc","jd_188425wum","jd_135315ofn","jd_131160xix","jd_186339gil","jd_150862gpa","jd_132385iqb","jd_138132znr","jd_384180113","jd_1362103","jd_139409xbn","jd_133146qwv","jd_132661jmj","jd_158676edk","jd_133316lld","jd_188714irz","jd_159103vma","jd_131148pkg","jd_152769boe","jd_138846yad","jd_132036kqj","jd_183813dsf","jd_189617vkq","jd_185715pgz","jd_159905euu","jd_134631ehy","jd_176278mmr","jd_5161d94861016","jd_135466mil","jd_177287yyr","jd_139720epl","jd_132037mat","jd_139830uaz","jd_138988jgl","jd_137222hds","jd_177038fca","jd_137096jyx","jd_189081vhx","jd_189985hzh","jd_151927ufa","jd_135145znf","jd_139306rrn","jd_130650d","jd_134321vtn","jd_151515epa","jd_135137jaia","jd_137164augj","jd_130024lmi","jd_139602byf","jd_183766qfi","jd_139705lek","jd_133834qau","jd_180157euk","jd_139111kud","jd_155116pea","jd_159626fgnc","jd_185154lww","jd_177435tuc","jd_137292pwe","jd_177395xqs","jd_133053jus","jd_151339jhx","jd_135087ljd","jd_53b1c5c35ac9a","jd_qiuche549","jd_158164uel","jd_138107wud","jd_199771clu","jd_186753jcs","jd_187150ylk","jd_138974rxt","jd_103433211","jd_185821hfr","jd_139502ycf","jd_137713uyd","jd_187698feo","jd_136089okg","jd_4352325","jd_139639yoj","jd_979798715","jd_131321aoc","jd_185224kzc","jd_151639rszh","jd_185669lfi","jd_lideguang_2011","jd_138725hyc","jd_qaa011","jd_135928ucx","jd_649f9eae0be6c","jd_155229vlt","jd_139885sgt","jd_136220wqh","jd_130741cki","jd_151611ebv","jd_189756rue","jd_5e95dcfd762f4","jd_6261731","jd_135495gbf","jd_150042iil","jd_137894frb","jd_135873xqmi","jd_138593nkp","jd_175412852","jd_139690dad","jd_43a2e9c6537f8","jd_138175wuk","jd_131716dfh","jd_138556pnn","jd_5020276315","jd_177316iqo","jd_181375rvj","jd_229003983","jd_180789bug","jd_150682yxz","jd_152181wlw","jd_224275759","jd_136102svi","jd_9929897714","jd_139691wvgh","jd_189305xgc","jd_133211nev","jd_138697wdw","jd_189314rid","jd_182520tcmf","jd_184399ypg","jd_156312gqm","jd_183257kbc","jd_8745170","jd_151758sra","jd_136000dfw","jd_138337tbg","jd_xishuwulu","jd_189shijz","jd_182257jvd","jd_156983msp","jd_316882724","jd_135808jxz","jd_135557shtf","jd_233102237","jd_186099qlx","jd_185263tir","jd_406bfe50a3525","jd_180669zge","jd_6402aba2128d9","jd_181335kmh","jd_137378ult","jd_150022yxf","jd_188540les","jd_133774erh","jd_138784rjl","jd_182817gcd","jd_134724ief","jd_132536dsy","jd_136604veq","jd_189715ich","jd_182876ynp","jd_177737trf","jd_186552tmg","jd_152104bbn","jd_136219qpt","jd_138262kmx","jd_176204injl","jd_183772tnk","jd_152150ixc","jd_139291nono","jd_186430qkb","jd_183182ynu","jd_135980gkl","jd_158520qfph","jd_135592ugy","jd_139445whz","jd_151308una","jd_150849jbh","jd_655789303","jd_136906lqt","jd_156206yfx","jd_137619mem","jd_152667dao","jd_138597bto","jd_189315etn","jd_151132kre","jd_239626183","jd_sdwh1","jd_136817uwz","jd_187119rqc","jd_yzztt","jd_157563ywzn","jd_zran012","jd_178280jig","jd_070889622","jd_132865tfs","jd_137098qlp","jd_159314ahj","jd_135530jsi","jd_156985tlp","jd_182109kiy","jd_183501fyv","jd_151668vpv","jd_138155ahi","jd_zwh082","jd_135647kui","jd_139149ipt","jd_186993pyi","jd_159524eku","jd_135392iff","jd_177019dfk","jd_185008kmg","jd_18259236618"];
  //随机生成m(小)到n(大)的数，包含m和n
  function randomFriendPin(m,n) {
    return Math.round(Math.random()*(n - m) + m);
  }
  let friendPin = friendsArr[randomFriendPin(0, friendsArr.length - 1)]  //强制为对方助力,可成为好友关系
  friendPin = encodeURI(friendPin);
  const timestamp = new Date().getTime()
  newUrl = url.replace(/friendPin=.*?$/i, "friendPin=" + friendPin).replace(/invitePin=.*?$/i, "invitePin=" + friendPin).replace(/inviteTimeStamp=.*?$/i, "inviteTimeStamp=" + timestamp + "&")
  console.log(newUrl)
  $done({ url: newUrl })
  