Advertisement
ppysen

Untitled

Jul 24th, 2019
1,306
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 39.79 KB | None | 0 0
  1. // ==UserScript==
  2. // @name Giveaway Task Auto Complete
  3. // @namespace http://tampermonkey.net/
  4. // @version 4.31
  5. // @description Auto Complete Giveaway Tasks.
  6. // @author fllp
  7. // @include *//marvelousga.com/giveaway/*
  8. // @include *//simplo.gg/index.php?giveaway=*
  9. // @include *//giveawayhopper.com/giveaway*
  10. // @include *//whosgamingnow.net/giveaway/*
  11. // @include *//www.chubbykeys.com/*
  12. // @include *//giftybundle.com/*
  13. // @include *//tmp.ghame.ru/*
  14. // @include *//keychampions.net/*
  15. // @include *//embloo.net/task/*
  16. // @include *//prys.ga/giveaway/*
  17. // @include *//gleam.io/*
  18. // @include *//treasuregiveaways.com/*
  19. // @include *//*getkeys.net/giveaway.php?id=*
  20. // @include *//*.dogebundle.com/*
  21. // @include *//gamehag.com/*
  22. // @include *//steamcn.com/*
  23. // @include *//dupedornot.com/giveaway.php?id=*
  24. // @include *//giveaway.su/giveaway/view/*
  25. // @include *//gamearn.me/*
  26. // @include *//www.bananagiveaway.com/giveaway/*
  27. // @include *//*.spoune.com/*
  28. // @include *//gamecode.win/giveaway/*
  29. // @include *//gamezito.com/giveaway/*
  30. // @require https://code.jquery.com/jquery-3.2.1.min.js
  31. // @run-at document-end
  32. // @grant GM_xmlhttpRequest
  33. // @connect twitter.com
  34. // @connect facebook.com
  35. // @connect twitch.tv
  36. // @connect instagram.com
  37. // @connect youtube.com
  38. // @connect steamcommunity.com
  39. // @connect discordapp.com
  40. // @connect bananatic.com
  41. // @connect dlh.net
  42. // @connect lucariomods.club
  43. // @connect google.com
  44. // @connect wowfeenix.com
  45. // @connect steampowered.com
  46. // @connect grabthegames.com
  47. // @connect grabfreegame.com
  48. // @connect gamingimpact.com
  49. // @connect vk.com
  50. // @connect oy-vey-keys.com
  51. // @connect clc.la
  52. // @connect bit.ly
  53. // @connect discord.gg
  54. // @connect dupedornot.com
  55. // @connect goo.gl
  56. // @connect t.me
  57.  
  58. // ==/UserScript==
  59. //
  60. var leavegroup=true;//(不想自动退组的人请把左边的true改成false然后点击左上角第二个图标保存)
  61. //
  62. //
  63. //
  64. this.$ = window.jQuery.noConflict(true);
  65. var i=-1;
  66. setTimeout(function(){
  67. var timer=setInterval(function(){
  68. if($('span.keystring:contains("XXXX")').length>0 || $('.text-center:contains("XXXX")').length>0 && $('.text-center:contains("No more")').length<1 && $('button>span').html()!="×" && $("div>strong:contains('Error')").length==0) {
  69. $('button>span:contains("Join ")').each(function(){
  70. $(this).click();
  71. });
  72. $('button>span:contains("Follow ")').each(function(){
  73. $(this).click();
  74. });
  75. if(($('button>span:contains("Leave ")').length+$('button>span:contains("Unfollow ")').length)==$('span[style*="display: none"]').length && $('button>span').html()!=null){
  76. if(window.location.href.indexOf("simplo.gg") > -1) {
  77. dosimplo();
  78. }else if(window.location.href.indexOf("marvelousga.com") > -1){
  79. domarvel(0);
  80. }else if(window.location.href.indexOf("giveawayhopper.com") > -1){
  81. dohopper();
  82. }else if(window.location.href.indexOf("giftybundle.com") > -1){
  83. dogifty();
  84. }else if(window.location.href.indexOf("dupedornot.com") > -1){
  85. fkdon(0);
  86. }else if(window.location.href.indexOf("chubbykeys.com") > -1){
  87. dochubby();
  88. }
  89. clearInterval(timer);
  90. }
  91. }else if(window.location.href.indexOf("whosgamingnow.net") > -1 && $('button>span').html()!="×"){
  92. if($('.action').length>0){
  93. $('button>span:contains("Join ")').each(function(){
  94. $(this).click();
  95. });
  96. $('button>span:contains("Follow ")').each(function(){
  97. $(this).click();
  98. });
  99. if(($('button>span:contains("Leave ")').length+$('button>span:contains("Unfollow ")').length)==$('span[style*="display: none"]').length && $('button>span').html()!=null){
  100. dowgn();
  101. clearInterval(timer);
  102. }
  103. }else{
  104. clearInterval(timer);
  105. leavegroups();
  106. }
  107. }else if(window.location.href.indexOf("embloo.net") > -1 && $('button>span').html()!="×"){
  108. if($('.taskItem').length>0){
  109. $('button>span:contains("Join ")').each(function(){
  110. $(this).click();
  111. });
  112. $('button>span:contains("Follow ")').each(function(){
  113. $(this).click();
  114. });
  115. if(($('button>span:contains("Leave ")').length+$('button>span:contains("Unfollow ")').length)==$('span[style*="display: none"]').length && $('button>span').html()!=null){
  116. doembloo();
  117. clearInterval(timer);
  118. }
  119. }else{
  120. clearInterval(timer);
  121. leavegroups();
  122. }
  123. }else if(window.location.href.indexOf("ghame.ru") > -1 && $('button>span').html()!="×"){
  124. if($(".visible.active").length>0){
  125. //if($('.ui compact celled table>tbody>tr').length>0){
  126. $('button>span:contains("Join ")').each(function(){
  127. $(this).click();
  128. });
  129. $('button>span:contains("Follow ")').each(function(){
  130. $(this).click();
  131. });
  132. if(($('button>span:contains("Leave ")').length+$('button>span:contains("Unfollow ")').length)==$('span[style*="display: none"]').length && $('button>span').html()!=null){
  133. doghame();
  134. clearInterval(timer);
  135. }
  136. }else{
  137. //clearInterval(timer);
  138. //leavegroups();
  139. }
  140. }else if(window.location.href.indexOf("prys.ga") > -1 && $('button>span').html()!="×"){
  141. if($("#success-msg").html()=="" && $("a[id*='check']").length>0){
  142. $('button>span:contains("Join ")').each(function(){
  143. $(this).click();
  144. });
  145. $('button>span:contains("Follow ")').each(function(){
  146. $(this).click();
  147. });
  148. if(($('button>span:contains("Leave ")').length+$('button>span:contains("Unfollow ")').length)==$('span[style*="display: none"]').length && $('button>span').html()!=null){
  149. doprys($("tr[id*='step']").length);
  150. clearInterval(timer);
  151. }
  152. }else{
  153. clearInterval(timer);
  154. leavegroups();
  155. }
  156. }else if(window.location.href.indexOf("gleam.io") > -1 && $('button>span').html()!="×"){
  157. if($(".coupon-code.ng-binding").length<1 || $(".coupon-code.ng-binding").html().indexOf("-")<1){
  158. $('button>span:contains("Join ")').each(function(){
  159. $(this).click();
  160. });
  161. $('button>span:contains("Follow ")').each(function(){
  162. $(this).click();
  163. });
  164. if(($('button>span:contains("Leave ")').length+$('button>span:contains("Unfollow ")').length)==$('span[style*="display: none"]').length && $('button>span').html()!=null){
  165. dogleam();
  166. clearInterval(timer);
  167. }
  168. }else{
  169. clearInterval(timer);
  170. leavegroups();
  171. }
  172. }else if(window.location.href.indexOf("getkeys.net") > -1 && $('button>span').html()!="×"){
  173. if($('.keyspan').eq(0).html()==" "){
  174. $('button>span:contains("Join ")').each(function(){
  175. $(this).click();
  176. });
  177. $('button>span:contains("Follow ")').each(function(){
  178. $(this).click();
  179. });
  180. if(($('button>span:contains("Leave ")').length+$('button>span:contains("Unfollow ")').length)==$('span[style*="display: none"]').length && $('button>span').html()!=null){
  181. dogetkeys();
  182. clearInterval(timer);
  183. }
  184. }else{
  185. clearInterval(timer);
  186. leavegroups();
  187. }
  188. }else if(window.location.href.indexOf("dogebundle.com") > -1 && $('button>span').html()!="×"){
  189. if($("div.alert.alert-success:contains('Your key')").length<1){
  190. $('button>span:contains("Join ")').each(function(){
  191. $(this).click();
  192. });
  193. $('button>span:contains("Follow ")').each(function(){
  194. $(this).click();
  195. });
  196. if(($('button>span:contains("Leave ")').length+$('button>span:contains("Unfollow ")').length)==$('span[style*="display: none"]').length-1 && $('button>span').html()!=null){
  197. if($(".giveaway-key>span:contains('code')").length==0){
  198. dodb();
  199. }
  200. clearInterval(timer);
  201. }
  202. }else{
  203. clearInterval(timer);
  204. leavegroups();
  205. }
  206. }else if(window.location.href.indexOf("gamehag.com") > -1 ){
  207. $('button>span:contains("Join ")').each(function(){
  208. $(this).click();
  209. });
  210. $('button>span:contains("Follow ")').each(function(){
  211. $(this).click();
  212. });
  213. if(($('button>span:contains("Leave ")').length+$('button>span:contains("Unfollow ")').length)==$('span[style*="display: none"]').length && $('button>span').html()!=null){
  214. if($(".giveaway-survey").length>0){
  215. //$(".giveaway-survey").each(function(){$(this).removeAttr("href").click();});
  216. //$("#pollfishSurveyFrame").remove();
  217. //$("#pollfishOverlay").remove();
  218. //giveawaySurvCompleted();
  219. eval('$(".giveaway-survey").each(function(){$(this).removeAttr("href")})');
  220. eval('$(".giveaway-survey").each(function(){$(this).click()})');
  221. eval('setTimeout(function(){$("#pollfishSurveyFrame").remove();$("#pollfishOverlay").remove()},700)');
  222. eval('giveawaySurvCompleted()');
  223. }
  224. dogh(0);
  225. clearInterval(timer);
  226. }
  227. }else if(window.location.href.indexOf("treasuregiveaways.com") > -1){
  228. if($("p:contains('You have already')").length<1){
  229. $('button>span:contains("Join ")').each(function(){
  230. $(this).click();
  231. });
  232. $('button>span:contains("Follow ")').each(function(){
  233. $(this).click();
  234. });
  235. if(($('button>span:contains("Leave ")').length+$('button>span:contains("Unfollow ")').length)==$('span[style*="display: none"]').length && $('button>span').html()!=null){
  236. dotreasure();
  237. clearInterval(timer);
  238. }
  239. }else{
  240. clearInterval(timer);
  241. leavegroups();
  242. }
  243. }else if(window.location.href.indexOf("steamcn.com") > -1){
  244. clearInterval(timer);
  245. if($(".t_f").eq(0).find("a[href*='dupedornot.com/giveaway']","a[href*='steamcommunity.com/groups']").length>0){
  246. if (confirm("检测到垃圾dupedkey站,是否自动加入steam组然后再进入领key页面?")) {
  247. dodon();
  248. } else {
  249. // Do nothing!
  250. }
  251. }
  252. }else if(window.location.href.indexOf("dupedornot.com/giveaway.php?id=") > -1){
  253. clearInterval(timer);
  254. fkdon(1);
  255. }else if(window.location.href.indexOf("giveaway.su/giveaway/view/") > -1){
  256. $('button>span:contains("Join ")').each(function(){
  257. $(this).click();
  258. });
  259. $('button>span:contains("Follow ")').each(function(){
  260. $(this).click();
  261. });
  262. if(($('button>span:contains("Leave ")').length+$('button>span:contains("Unfollow ")').length)==$('span[style*="display: none"]').length && $('button>span').html()!=null){
  263. clearInterval(timer);
  264. dogs();
  265. }
  266. }else if(window.location.href.indexOf("gamearn.me") > -1){
  267. clearInterval(timer);
  268. var str=$("button:contains('Join Giveaway')").attr("onclick");
  269. var regex=/'(.*)'/;
  270. var galink=str.match(regex);
  271. window.location=galink[1];
  272. }else if(window.location.href.indexOf("bananagiveaway.com") > -1){
  273. clearInterval(timer);
  274. if($(".jobs:contains('Your key')").length==0 && $(".bottom:contains('Please login')").length==0){
  275. dobg();
  276. }else{
  277. leavegroups();
  278. }
  279. }else if(window.location.href.indexOf("spoune.com") > -1){
  280. clearInterval(timer);
  281. if($("#claimKey").length>0){
  282. dosp();
  283. }
  284. }else if(window.location.href.indexOf("gamecode.win") > -1){
  285. $('button>span:contains("Join ")').each(function(){
  286. $(this).click();
  287. });
  288. $('button>span:contains("Follow ")').each(function(){
  289. $(this).click();
  290. });
  291. if(($('button>span:contains("Leave ")').length+$('button>span:contains("Unfollow ")').length)==$('span[style*="display: none"]').length && $('button>span').html()!=null || $("button:contains('VERIFY')").length==0){
  292. clearInterval(timer);
  293. if($(".lightRed:contains('complete')").length==0){
  294. dogc();
  295. }else{
  296. leavegroups();
  297. }
  298. }
  299. }else if(window.location.href.indexOf("marvelousga.com") > -1){
  300. $('button>span:contains("Join ")').each(function(){
  301. $(this).click();
  302. });
  303. $('button>span:contains("Follow ")').each(function(){
  304. $(this).click();
  305. });
  306. if(($('button>span:contains("Leave ")').length+$('button>span:contains("Unfollow ")').length)==$('span[style*="display: none"]').length && $('button>span').html()!=null){
  307. clearInterval(timer);
  308. if(!$(".card-body.text-center").eq(0).html().includes("YOUR KEYS")){
  309. domarvel(0);
  310. }else{
  311. leavegroups();
  312. }
  313. }
  314. }else if(window.location.href.indexOf("gamezito.com") > -1){
  315. $('button>span:contains("Join ")').each(function(){
  316. $(this).click();
  317. });
  318. $('button>span:contains("Follow ")').each(function(){
  319. $(this).click();
  320. });
  321. if(($('button>span:contains("Leave ")').length+$('button>span:contains("Unfollow ")').length)==$('span[style*="display: none"]').length && $('button>span').html()!=null){
  322. clearInterval(timer);
  323. if($("#insertkey").eq(0).html()==""){
  324. dogz(0);
  325. }else{
  326. leavegroups();
  327. }
  328. }
  329. }else if($('button>span').html()=="×" || $("div>strong:contains('Error')").length>0 && window.location.href.indexOf("steamcn.com") ==-1 && window.location.href.indexOf("gamearn.me") > -1){
  330. alert("前提脚本出现错误,请检查问题然后刷新页面重试。");
  331. clearInterval(timer);
  332. }else{
  333. clearInterval(timer);
  334. leavegroups();
  335. }
  336. },3000);
  337. },1000);
  338.  
  339.  
  340.  
  341. function dosimplo(){
  342. i++;
  343. var sb=$('.takeaction');
  344. if(i<sb.length){
  345. setTimeout(function () {
  346. var sources=$(sb[i]).attr('data-source');
  347. var tg=$(sb[i]).attr('data-giveaway');
  348. var dt=$(sb[i]).attr('data-task');
  349. $.post('take_action.php',{
  350. task_id:dt,
  351. task_giveaway:tg,
  352. account_secret:account_secret,
  353. steamid:steamid,
  354. task_source:sources
  355. }, function(response){
  356. var json_response = jQuery.parseJSON(response);
  357. console.log(json_response);
  358. if(json_response.message.indexOf("wait a few seconds")>-1){
  359. i--;
  360. dosimplo();
  361. return;
  362. }else if(json_response.message.indexOf("first")>-1){
  363. alert("此脚本出现了点问题,即将打开出现错误的任务页面,请手动完成!然后刷新页面再试。");
  364. window.open(sources,"_blank");
  365. return;
  366. }else{
  367. dosimplo();
  368. }
  369. });
  370. },100);
  371. }else{
  372. alert("可以领取key了,不要刷新页面。");
  373. leavegroups();
  374. }
  375.  
  376. }
  377.  
  378. function domarvel(i){
  379. if(i<$("button:contains('VERIFY')").length){
  380. /*if($("a[href*='curator']").length>0){
  381. var sgs=[];
  382. $("a[href*='curator']").each(function(){
  383. var regex=/\d+/;
  384. var sgsl=$(this).attr("href").match(regex);
  385. sgs.push(sgsl);
  386. });
  387. console.log(sgs);
  388. joinsteamgroup(sgs);
  389. }
  390. var gamehag=$('input.form-control');
  391. if(gamehag.length>0){
  392. alert("此页面是个坑,关了吧。");
  393. leavegroups();
  394. return;
  395. }else{
  396. alert("可以领取key了,不用刷新页面。");
  397. }
  398. */
  399. eval('$("a[id*=\'task\']").each(function(){$(this).removeAttr("href").click();})');
  400. setTimeout(function(){
  401. if(i<$("button[id*='task']").length){
  402. $("button[id*='task']").eq(i).click();
  403. i++;
  404. domarvel(i);
  405. }
  406. },1200);
  407. }
  408. var lg=setInterval(function(){
  409. if($("#key_display_container").html()!=""){
  410. //clearInterval(lg);
  411. //console.log("lg");
  412. leavegroups();
  413. clearinterval(lg);
  414. }
  415. },1000);
  416. }
  417. function dogz(i){
  418. if(i<$("button:contains('VERIFY')").length){
  419. /*if($("a[href*='curator']").length>0){
  420. var sgs=[];
  421. $("a[href*='curator']").each(function(){
  422. var regex=/\d+/;
  423. var sgsl=$(this).attr("href").match(regex);
  424. sgs.push(sgsl);
  425. });
  426. console.log(sgs);
  427. joinsteamgroup(sgs);
  428. }
  429. var gamehag=$('input.form-control');
  430. if(gamehag.length>0){
  431. alert("此页面是个坑,关了吧。");
  432. leavegroups();
  433. return;
  434. }else{
  435. alert("可以领取key了,不用刷新页面。");
  436. }
  437. */
  438. eval('$("a[id*=\'task\']").each(function(){$(this).removeAttr("href").click();})');
  439. setTimeout(function(){
  440. if(i<$("button[id*='task']").length){
  441. $("button[id*='task']").eq(i).click();
  442. i++;
  443. dogz(i);
  444. }
  445. },1200);
  446. }
  447. var lg=setInterval(function(){
  448. if($("#insertkey").html()!=""){
  449. //clearInterval(lg);
  450. //console.log("lg");
  451. leavegroups();
  452. clearinterval(lg);
  453. }
  454. },1000);
  455. }
  456. function dohopper(){
  457. alert("可以领取key了,不用刷新页面。");
  458. }
  459. function leavegroups(){
  460. if(leavegroup){
  461. $('button>span:contains("Leave")').each(function(){
  462. $(this).click();
  463. });
  464. $('button>span:contains("Unfollow")').each(function(){
  465. $(this).click();
  466. });
  467. $('button>span:contains("Delete")').each(function(){
  468. $(this).click();
  469. });
  470. var timer=setInterval(function(){
  471. if(($('button>span:contains("Join")').length+$('button>span:contains("Follow")').length+$('button>span:contains("Delete")').length)==$('span[style*="display: none"]').length && $('button>span').html()!=null){
  472. clearInterval(timer);
  473. return;
  474. }else{
  475. leavegroups();
  476. }
  477. },600);
  478. if($("a[href*='curator']").length>0){
  479. var sgs=[];
  480. $("a[href*='curator']").each(function(){
  481. var regex=/\d+/;
  482. var sgsl=$(this).attr("href").match(regex);
  483. sgs.push(sgsl);
  484. });
  485. leavesteamgroup(sgs);
  486. }
  487. if($(".lightRed:contains('complete')").length>0){
  488.  
  489. }
  490. }
  491. }
  492. function doembloo(){
  493. var timer=setInterval(function(){
  494. if ($("#pendingGroupParent").length) {
  495. var p = $("#pendingGroupParent");
  496. }
  497. var el = $(".taskItem");
  498. for(var s=0;s<el.length;s++){
  499. $.ajax({
  500. url: '../php/functions.php',
  501. type: 'POST',
  502. data: {
  503. action: 'startTask',
  504. taskID: $(el[s]).attr("taskID"),
  505. taskURL: $(el[s]).attr("taskURL"),
  506. taskGroupID: $(el[s]).attr("taskGroupID")
  507. }
  508. }).done(function(e) {
  509. if ($("#pendingGroupParent").length) {
  510. p.fadeOut('fast', function() {
  511. $(el[s]).remove();
  512. });
  513. }
  514. $(el[s]).remove();
  515. if(e.indexOf("completeParent")>-1){
  516. alert("任务已全部完成,去查看你的key吧。");
  517. leavegroups();
  518. clearInterval(timer);
  519. location.reload();
  520. return;
  521. }
  522. });
  523. }
  524. },5000);
  525. }
  526. function dowgn(){
  527. $(".action").children("i").addClass("fa-check-square-o");
  528. $(".action").children("i").removeClass("fa-share-square");
  529. var timer=setInterval(function(){
  530. if($('.fa-share-square').length==0){
  531. alert("可以领取key了,不用刷新页面。");
  532. clearInterval(timer);
  533. return;
  534. }else{
  535. $(".action").children("i").addClass("fa-check-square-o");
  536. $(".action").children("i").removeClass("fa-share-square");
  537. }
  538. },2000);
  539. }
  540. function doghame(){
  541. $("button[onclick*='document.cookie']").each(function(){
  542. //$(this).click();
  543. var cmd=$(this).attr("onclick").split("\";");
  544. console.log(cmd[0]);
  545. var sb=eval(cmd[0]+"\"");
  546. $(this).parent().parent().children().children("button[onclick*='check_task(']").click();
  547. });
  548. var timer=setInterval(function(){
  549. $("button[onclick*='check_task(']").click();
  550. if($(".modal_get_key.visible.active").length>0){
  551. leavegroups();
  552. clearInterval(timer);
  553. }
  554. },3000);
  555. }
  556. function dogifty(){
  557. //var windows=[];
  558. //var twitch=$('a[href*="twitch.tv"]');
  559. var gamehag=$('input.form-control');
  560. if(gamehag.length>0){
  561. alert("此页面是个坑,关了吧。");
  562. leavegroups();
  563. return;
  564. }else{
  565. alert("可以领取key了,不用刷新页面。");
  566. }
  567. }
  568. function doprys(i){
  569. for(var a=0;a<i;a++){
  570. checkStep(a);
  571. }
  572. var timer=setInterval(function(){
  573. if($("#captcha").html()==null){
  574. for(var s=0;s<$("a[id*='check']").length;s++){
  575. $("a[id*='check']")[s].click();
  576. }
  577. }else{
  578. alert("可以领取key了,不用刷新页面。");
  579. leavegroups();
  580. clearInterval(timer);
  581. }
  582. },3000);
  583. }
  584. function dogleam(){
  585. console.log("entered gleam");
  586. //var waitcode=setInterval(function(){
  587. //$(".btn.btn-large.btn-info.btn-embossed").removeAttr("href").removeAttr("ng-href").each(function(){
  588. //$(".enter-link.default").eachclick();
  589. //$(this).click();
  590. //$("span:contains('Continue')").click();
  591. //});
  592. //if($(".coupon-code.ng-binding").length<1 || $(".enter-link.default").length>1){
  593. //$("span:contains('Continue')").click();
  594. //}else{
  595. //clearInterval(waitcode);
  596. //}
  597. //},5000)
  598. if($(".share-border").length>0){
  599. $(".share-border").parent().removeClass();
  600. }else if($("span.ng-binding:contains('Bonus for')").length>0){
  601. $("span.ng-binding:contains('Bonus for')").parent().parent().remove();
  602. }
  603. var waitkey=setInterval(function(){
  604. if($(".coupon-code.ng-binding").length<1 || $(".coupon-code.ng-binding").html().indexOf("-")<1){
  605. if($(".enter-link:not('.done')").length==$("span.ng-binding:contains('Bonus for')").length+$(".share-border").length){
  606. console.log("done");
  607. leavegroups();
  608. clearInterval(waitkey);
  609. return;
  610. }
  611. for(var s=0;s<$(".btn.btn-large.btn-info.btn-embossed").length;s++){
  612. $(".btn.btn-large.btn-info.btn-embossed").eq(s).removeAttr("href").removeAttr("ng-href").removeAttr("target");
  613. $(".btn.btn-large.btn-info.btn-embossed")[s].click();
  614. }
  615. $(".btn:contains('Continue')").click();
  616. for(var i=0;i<$(".enter-link.default:not('.done')").length;i++){
  617. //$(".entry-method").eq(i).click();
  618. //$("div[style='display: inline-block; position: relative; z-index: 1']").click();
  619. $(".enter-link:not('.done')")[i].click();
  620. }
  621. }else{
  622. leavegroups();
  623. clearInterval(waitkey);
  624. }
  625. },4000);
  626. }
  627. function dochubby(){
  628. var gamehag=$('input.form-control');
  629. if(gamehag.length>0){
  630. alert("此页面是个坑,关了吧。");
  631. leavegroups();
  632. return;
  633. }else{
  634. alert("可以领取key了,不用刷新页面。");
  635. }
  636. }
  637. function dotreasure(){
  638. console.log("entered treasure");
  639. //$("a").attr("href","");
  640. //$("input[onclick*='incr']").click();
  641. //$("input[type='submit']").click();
  642. document.getElementById("final").disabled = false;
  643. document.getElementById("final").style.visibility = "visible";
  644. $("p>b").html("<p style='color:orange'>直接点击Claim按钮,无视任务</p>");
  645. }
  646. function dogetkeys(){
  647. console.log("entered getkeys");
  648. var sb=setInterval(function(){
  649. if($('.keyspan').eq(0).html()==" "){
  650. $(".responsive-tablebody-item[style*='pointer-events: none;']").children('.giveawayshow').remove();
  651. }else{
  652. clearInterval(sb);
  653. leavegroups();
  654. }
  655. },2000);
  656. $(".giveawayshowthree").each(function(){
  657. var sb2=$(this);
  658. GM_xmlhttpRequest({
  659. method:'GET',
  660. url:$(this).attr("href"),
  661. onload: function(response) {
  662. sb2.parent().children("button").click();
  663. }
  664. });
  665. //$(this).parent().remove();
  666. });
  667. //},10000);
  668. }
  669. function dodb(){
  670. //var regex = /\index\.php\?page\=forward\&id\=(.+?)>/g;
  671. var regex = /\index\.php\?page\=forward\&id\=(\d+)/g;
  672. GM_xmlhttpRequest({
  673. url:window.location.href,
  674. method:'GET',
  675. onload: function(response){
  676. var webs=response.responseText.match(regex);
  677. console.log(webs);
  678. for(i=0;i<webs.length;i++){
  679. //if(webs[i].includes("+") && webs[i].includes("'")){
  680. eval('$.get("'+webs[i]+ '\",function (data) {});');
  681. //}else{
  682. //$.ajax({
  683. //url:webs[i],
  684. //type:'GET',
  685. //success: function(data){
  686. //
  687. //}
  688. //});
  689. //}
  690. }
  691. alert("任务应该做完了,刷新看看");
  692. }
  693. });
  694. //var regex2 = /gbAutoComplete\((.+?)\)/g;
  695. //$("button[onclick*='gbAutoComplete(']").each(function(){
  696. //var url=$(this).parent().attr("href");
  697. //console.log(url);
  698. //var functionstr=$(this).attr("onclick");
  699. //var num=functionstr.match(regex2);
  700. //eval(num[0]);
  701. //console.log(num[0]);
  702. //});
  703. //$("button[id*='steamgroup']").click();
  704. //$("button[id*='steamgroup']").each(function(){
  705. //var checkgroup=$(this).attr("id").match(/\d+/);
  706. //eval("gbAutoComplete("+checkgroup[0]+")");
  707. //});
  708. //$("button[id*='watchtrigger']").each(function(){
  709. //var checkyoutube=$(this).attr("id").match(/\d+/);
  710. //eval("gbAutoComplete("+checkyoutube[0]+")");
  711. //});
  712. //$("#follow-button").click();
  713. //$("button[id*='twcheck']").each(function(){
  714. //var checktwitter=$(this).attr("id").match(/\d+/);
  715. //eval("gbAutoComplete("+checktwitter[0]+")");
  716. //});
  717. }
  718. function dogh(i){
  719. //var arrive=setInterval(function(){
  720. var interval1=setInterval(function(){
  721. if(parseInt($("#visible-input").attr("size"))>0){
  722. leavegroups();
  723. clearInterval(interval1);
  724. }
  725. },3000);
  726. if($("a[href*='/giveaway/click/']").length>0 && window.location.href.match(/\d+/)>-1){
  727. console.log("entered gamehag");
  728. //var check=setInterval(function(){
  729. if($("#getkey").length!=0){
  730. var sb2=browseURL("https://gamehag.com/games/war-thunder/play");
  731. var db= $("a[href*='/giveaway/click/']");
  732. /*db.each(function(){
  733. var sb= $(this);
  734. var fk=browseURL(sb.attr("href"));
  735. sb.parent().children("button").click();
  736. db= $("a[href*='/giveaway/click/']");
  737. //GM_xmlhttpRequest({
  738. //url:sb.attr("href"),
  739. // method:'GET',
  740. //onload: function(response){
  741. //sb.parent().children("button").click();
  742. //}
  743. //});
  744. //setTimeout(function(){
  745. //$(this).parent().children("button").click();
  746. //},3000);
  747. });
  748. */if(i<db.length){
  749. setTimeout(function(){
  750. browseURL(db.eq(i).attr("href"));
  751. console.log("browsed");
  752. setTimeout(function(){
  753. db.eq(i).parent().children("button").click();
  754. console.log("clicked");
  755. i++;
  756. dogh(i);
  757. },1000);
  758. },300);
  759. }
  760. var f=setInterval(function(){
  761. if(sb2==1){
  762. $(".box-collapse-verify").click();
  763. clearInterval(f);
  764. }
  765. },3000);
  766. }
  767. //},8000);
  768. }
  769. //},5000);
  770. }
  771. function dodon(){
  772. //$(".t_f").eq(0).find("a[href*='dupedornot.com/giveaway.php?id=']","a[href*='steamcommunity.com/groups']")
  773. var ljdon=$(".t_f").eq(0).find("a[href*='dupedornot.com/giveaway']");
  774. //var sg=$(".t_f").eq(0).find("a[href*='steamcommunity.com/groups']");
  775. var sg=$("a[href*='steamcommunity.com/groups']");
  776. GM_xmlhttpRequest({
  777. url:$(sg).eq(0).attr("href"),
  778. method:'GET',
  779. headers: {
  780. "Content-Type": "application/x-www-form-urlencoded"
  781. },
  782. onload: function(response){
  783. //console.log(response.responseText);
  784. var sb= response.responseText.match(/name="sessionid" value="(.+?)"/);
  785. //console.log(sb[1]);
  786. for(var i=0;i<sg.length;i++){
  787. //data: {
  788. //action: "join",
  789. //sessionID: sb[1]
  790. //},
  791. GM_xmlhttpRequest({
  792. url:$(sg).eq(i).attr("href"),
  793. method:'POST',
  794. data:'action=join&sessionID='+sb[1],
  795. headers: {
  796. "Content-Type": "application/x-www-form-urlencoded"
  797. },
  798. onload: function(response){
  799. //console.log(response.status);
  800. }
  801. });
  802. }
  803. window.open(ljdon[0],"_blank");
  804. }
  805. });
  806. }
  807. function fkdon(a){
  808. console.log("entered fkdon");
  809. if(a==0){
  810. //alert("如果此页面是脚本为你打开的,那么你可以直接完成验证码领取key了(领取失败则说明原帖的steam组并没有放完整).");
  811. $("h5.text-center").eq(0).html("<strong style='color:red'>如果此页面是脚本为你打开的,那么你可以直接完成验证码领取key了(领取失败则说明原帖的steam组并没有放完整).</strong>");
  812. }else{
  813. var nodup=$("a[href*='worked.php?id=']");
  814. $.get( $(nodup).eq(1).attr("href"), function( data ) {});
  815. }
  816. }
  817. function dogs(){
  818. var sg=$("a[href*='steamcommunity.com/groups']");
  819. var lgprep=[];
  820. var sb,name;
  821. //if($("button[data-type='steam.group']").length>0){
  822. //$("tbody>tr>td>a:contains('Steam group')").each(function(){
  823. //var regex= $(this).html().match(/"(.+)"/);
  824. //var case1=regex[1].replace(/[^a-zA-Z\d\s:]/g, '-');
  825. //var case2=case1.replace(/\s/g, '_');
  826. /*GM_xmlhttpRequest({
  827. url:$(sg).eq(0).attr("href"),
  828. method:'GET',
  829. headers: {
  830. "Content-Type": "application/x-www-form-urlencoded"
  831. },
  832. onload: function(response){
  833. sb= response.responseText.match(/name="sessionid" value="(.+?)"/);
  834. name=response.responseText.match(/steamcommunity\.com\/id\/(.+?)\/home_process/);
  835. $("button[data-type='steam.group']").each(function() {
  836. lgprep.push($(this).data("check"));
  837. GM_xmlhttpRequest({
  838. url:"https://steamcommunity.com/gid/"+$(this).data("check"),
  839. method:'POST',
  840. data:'action=join&sessionID='+sb[1],
  841. headers: {
  842. "Content-Type": "application/x-www-form-urlencoded"
  843. },
  844. onload: function(response){
  845. //if(response.responseText.indexOf("Error")>-1){
  846. //GM_xmlhttpRequest({
  847. //url:"https://steamcommunity.com/groups/"+case2,
  848. //method:'POST',
  849. //data:'action=join&sessionID='+sb[1],
  850. //headers: {
  851. //"Content-Type": "application/x-www-form-urlencoded"
  852. //},
  853. //onload: function(response){
  854. //}
  855. //});
  856. //}
  857. $(this).click();
  858. $(".actions-call").html("<p style='color:red'><strong>应该可以领取了,除非需要discord</strong></p>");
  859. console.log(lgprep);
  860. }
  861. });
  862. });
  863. }
  864. });
  865. }
  866. */
  867. if($("p:contains('install')").length>0){
  868. if (confirm("检测到你没有安装giveaway.su免扩展脚本,是否前往该脚本发布页面?")) {
  869. location.href="https://steamcn.com/t402150-1-1";
  870. } else {
  871. // Do nothing!
  872. }
  873. }else{
  874. $("#getKey").children().eq(0).removeClass("disabled");
  875. $(".actions-call").html("<h1><p style='color:red'><strong>直接领取,除非需要discord的话就先绑定,不需要弄绿</strong></p></h1>");
  876. /*if($("a:contains('curator')").length>0){
  877. $("a:contains('curator')").each(function(){
  878. var sgs=$(this).attr("href");
  879. GM_xmlhttpRequest({
  880. url:sgs,
  881. method:'GET',
  882. headers: {
  883. "Content-Type": "application/x-www-form-urlencoded"
  884. },
  885. onload: function(response){
  886. console.log(response.finalUrl.substring(response.finalUrl.indexOf("curator/")+8,response.finalUrl.lastIndexOf("/")));
  887. var sb= response.responseText.match(/g_sessionID = "(.+?)";/);
  888. console.log(sb[1]);
  889. GM_xmlhttpRequest({
  890. url:'https://store.steampowered.com/curators/ajaxfollow',
  891. method:'POST',
  892. data:'clanid='+response.finalUrl.substring(response.finalUrl.indexOf("curator/")+8,response.finalUrl.lastIndexOf("/"))+'&sessionid='+sb[1]+'&follow=1',
  893. headers: {
  894. "Content-Type": "application/x-www-form-urlencoded"
  895. },
  896. onload: function(response){
  897. //if(response.responseText.indexOf("Error")>-1){
  898. //GM_xmlhttpRequest({
  899. //url:"https://steamcommunity.com/groups/"+case2,
  900. //method:'POST',
  901. //data:'action=join&sessionID='+sb[1],
  902. //headers: {
  903. //"Content-Type": "application/x-www-form-urlencoded"
  904. //},
  905. //onload: function(response){
  906. //}
  907. //});
  908. //}
  909. //console.log(response.responseText);
  910.  
  911. }
  912. });
  913. }
  914. });
  915. })
  916. }
  917. */
  918. var lg=setInterval(function(){
  919. if($(".giveaway-key").length>0){
  920. //clearInterval(lg);
  921. //console.log("lg");
  922.  
  923. leavegroups();
  924. }
  925. },500);
  926. }
  927. }
  928. function dobg(){
  929. $("button").removeAttr("disabled");
  930. $("button:contains('To do')").each(function(){
  931. var sb1=$(this);
  932. var str=sb1.attr("onclick");
  933. if(str){
  934. var bregex=/'(.+?)'/;
  935. var blink=str.match(bregex);
  936. GM_xmlhttpRequest({
  937. url:blink[1],
  938. method:'GET',
  939. headers: {
  940. "Content-Type": "application/x-www-form-urlencoded"
  941. },
  942. onload: function(response){
  943. //if(response.finalUrl.indexOf("steamcommu")>-1){
  944. GM_xmlhttpRequest({
  945. url:response.finalUrl,
  946. method:'GET',
  947. headers: {
  948. "Content-Type": "application/x-www-form-urlencoded"
  949. },
  950. onload: function(response){
  951. //console.log(response.responseText);
  952. if(response.finalUrl.indexOf("steamcommu")>-1){
  953. var sb= response.responseText.match(/name="sessionid" value="(.+?)"/);
  954. //console.log(sb[1]);
  955. //data: {
  956. //action: "join",
  957. //sessionID: sb[1]
  958. //},
  959. GM_xmlhttpRequest({
  960. url:response.finalUrl,
  961. method:'POST',
  962. data:'action=join&sessionID='+sb[1],
  963. headers: {
  964. "Content-Type": "application/x-www-form-urlencoded"
  965. },
  966. onload: function(response){
  967. //console.log(response.status);
  968. }
  969. });
  970. }
  971. }
  972. });
  973. //}
  974. var str2=sb1.parent().children("button:contains('Verify')").attr("onclick");
  975. var bregex2=/'(.+?)'/;
  976. var blink2=str2.match(bregex2);
  977. console.log(blink2[1]);
  978. GM_xmlhttpRequest({
  979. url:blink2[1],
  980. method:'GET',
  981. headers: {
  982. "Content-Type": "application/x-www-form-urlencoded"
  983. },
  984. onload: function(response){
  985. }
  986. });
  987. }
  988. });
  989. }
  990. });
  991. if($(".jobs:contains('Your key')").length==0){
  992. alert("如果你的steam账户已经登录并绑定,那么刷新页面就应该自动做完大部分任务了,有网站登录验证的任务自行完成。");
  993. }
  994. }
  995. function joinsteamgroup(groups){
  996. console.log(groups);
  997. var isnum = /^\d+$/.test(groups[0]);
  998. var url="";
  999. if(isnum){
  1000. url="https://steamcommunity.com/gid/";
  1001. }else{
  1002. url="https://steamcommunity.com/groups/";
  1003. }
  1004. GM_xmlhttpRequest({
  1005. url:url+groups[0],
  1006. method:'GET',
  1007. headers: {
  1008. "Content-Type": "application/x-www-form-urlencoded"
  1009. },
  1010. onload: function(response){
  1011. var sb= response.responseText.match(/name="sessionid" value="(.+?)"/);
  1012. for(var i=0;i<groups.length;i++){
  1013. GM_xmlhttpRequest({
  1014. url:url+groups[i],
  1015. method:'POST',
  1016. data:'action=join&sessionID='+sb[1],
  1017. headers: {
  1018. "Content-Type": "application/x-www-form-urlencoded"
  1019. },
  1020. onload: function(response){
  1021. //console.log(response.status);
  1022. }
  1023. });
  1024. }
  1025. }
  1026. });
  1027. return 1;
  1028. }
  1029. function leavesteamgroup(groups){
  1030. var isnum = /^\d+$/.test(groups[0]);
  1031. var url="";
  1032. if(isnum){
  1033. url="https://steamcommunity.com/gid/";
  1034. }else{
  1035. url="https://steamcommunity.com/groups/";
  1036. }
  1037. for(var i=0;i<groups.length;i++){
  1038. GM_xmlhttpRequest({
  1039. url:url+groups[i],
  1040. method:'GET',
  1041. headers: {
  1042. "Content-Type": "application/x-www-form-urlencoded"
  1043. },
  1044. onload: function(response){
  1045. var name=response.responseText.match(/steamcommunity\.com\/id\/(.+?)\/home_process/);
  1046. var sb= response.responseText.match(/name="sessionid" value="(.+?)"/);
  1047. var groupid=response.responseText.match(/name="groupId" value="(.+?)"/);
  1048. GM_xmlhttpRequest({
  1049. url:"http://steamcommunity.com/id/"+name[1]+"/home_process",
  1050. method:'POST',
  1051. data:'action=leaveGroup&sessionID='+sb[1]+'&groupId='+groupid[1],
  1052. headers: {
  1053. "Content-Type": "application/x-www-form-urlencoded"
  1054. },
  1055. onload: function(response){
  1056.  
  1057. }
  1058. });
  1059. }
  1060. });
  1061. }
  1062. return 1;
  1063. }
  1064. function browseURL(link){
  1065. GM_xmlhttpRequest({
  1066. url:link,
  1067. method:'GET',
  1068. onload: function(response){
  1069. return 1;
  1070. }
  1071. });
  1072. }
  1073. function dosp(){
  1074. console.log("start");
  1075. setInterval(function(){
  1076. console.log(document.getElementById("link").getAttribute("onclick"));
  1077. eval(document.getElementById("link").getAttribute("onclick"));
  1078. },1000);
  1079. }
  1080. function dogc(){
  1081. /*var groups=[];
  1082. $(".doItBtn").removeAttr("disabled");
  1083. $("a[href*='steamcommunity.com/groups/']").each(function(){
  1084. var gN=$(this).attr("href").substring($(this).attr("href").lastIndexOf("/")+1);
  1085. groups.push(gN);
  1086. });
  1087. */
  1088. //var sb=joinsteamgroup(groups);
  1089. var f=setInterval(function(){
  1090. $("button[id*='Task']").each(function(){
  1091. $(this).attr('disabled', false).text('VERIFY').click();
  1092. });
  1093. alert("剩下的交给你了");
  1094. clearInterval(f);
  1095. },3000);
  1096. var s=setInterval(function(){
  1097. if($("#button-container[style*='display']").length==0){
  1098. if(leavegroup){
  1099. //leavesteamgroup(groups);
  1100. leavegroups();
  1101. }
  1102. clearInterval(s);
  1103. console.log("fk2");
  1104. }else{
  1105. $(".clickLink").removeAttr("href").trigger("click");
  1106. console.log("fk");
  1107. }
  1108. },3000);
  1109. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement