LoliAutists Group Invite

Autoinvites when you view a profile

  1. // ==UserScript==
  2. // @name LoliAutists Group Invite
  3. // @namespace LoliAutists
  4. // @description Autoinvites when you view a profile
  5. // @match *://steamcommunity.com/id/*
  6. // @match *://steamcommunity.com/profile/*
  7. // @require http://code.jquery.com/jquery-2.1.4.min.js
  8. // @version 1
  9. // @grant none
  10. // ==/UserScript==
  11.  
  12. function InviteUserToSteamGroup(group_id)
  13. {
  14. var params = {
  15. json: 1,
  16. type: 'groupInvite',
  17. group: group_id,
  18. sessionID: g_sessionID,
  19. invitee: g_rgProfileData.steamid
  20. };
  21.  
  22. $.ajax({
  23. url: 'http://steamcommunity.com/actions/GroupInvite',
  24. data: params,
  25. type: 'POST',
  26. dataType: 'json'
  27. }).done(function(data) {
  28. if (data.duplicate) {
  29. console.log('[' + g_rgProfileData.steamid + '] The user are already in the group or have already received invites.');
  30. } else {
  31. console.log('[' + g_rgProfileData.steamid + '] Invite to Join Your Group.');
  32. }
  33. }).fail(function() {
  34. console.log('Error processing your request. Please try again.');
  35. });
  36. }
  37.  
  38. function GetGroupData(steam_group_custom_url)
  39. {
  40. return $.ajax({
  41. url: 'http://steamcommunity.com/groups/' + steam_group_custom_url + '/memberslistxml',
  42. data: { xml:1 },
  43. type: 'GET',
  44. dataType: 'xml'
  45. }).done(function(xml) {
  46. InviteUserToSteamGroup($(xml).find('groupID64').text());
  47. }).fail(function() {
  48. console.log('The request failed or the group custom URL is wrong.');
  49. });
  50. }
  51.  
  52. // Start invite process
  53. GetGroupData("GhettoPatrol");

QingJ © 2025

镜像随时可能失效,请加Q群300939539或关注我们的公众号极客氢云获取最新地址