Windscribe Chrome Extension Region Auto Switcher

Doesn't actually work as a userscript, paste into console.

作者のサイトでサポートを受ける。または、このスクリプトの質問や評価の投稿はこちら通報はこちらへお寄せください。
  1. // ==UserScript==
  2. // @name Windscribe Chrome Extension Region Auto Switcher
  3. // @description Doesn't actually work as a userscript, paste into console.
  4. // @author onlypuppy7
  5. // @namespace https://discord.gg/n6MEg2vfcw/
  6. // @supportURL http://forum.onlypuppy7.online/
  7. // @license GPL-3.0
  8. // @icon https://raw.githubusercontent.com/Hydroflame522/StateFarmClient/main/icons/StateFarmClientLogo384px.png
  9. // @version 1.0
  10. // @match chrome-extension://hnmpcagpplmpfojmgmnngilcnanddlhb/popup.html
  11. // ==/UserScript==
  12.  
  13. function clickLocationsButton() {
  14. document.querySelector('[aria-label="Locations"]').click();
  15. }
  16.  
  17. function clickHeartButton() {
  18. document.querySelector('.css-klg4th-InlineButton-baseStyle-InlineButtonStyle-HeaderMenuItem').click();
  19. }
  20.  
  21. function clickAtlanta() {
  22. const datacenters = document.querySelectorAll('.css-dn8yaz-DatacenterListItem');
  23. if (datacenters.length > 0) {
  24. const randomIndex = Math.floor(Math.random() * datacenters.length);
  25. datacenters[randomIndex].click();
  26. } else {
  27. console.log('No datacenter elements found.');
  28. }
  29. }
  30.  
  31. function clickAutopilot() {
  32. var datacenterItems = document.querySelectorAll('.css-1oh5hha-BaseListItem-DatacenterListItem');
  33. var randomIndex = Math.floor(Math.random() * datacenterItems.length);
  34. datacenterItems[randomIndex].click();
  35. }
  36.  
  37. function connect() {
  38. clickLocationsButton();
  39. setTimeout(function() {
  40. clickHeartButton();
  41. setTimeout(function() {
  42. clickAtlanta();
  43. if (REPEAT) setTimeout(function() {
  44. clickLocationsButton();
  45. setTimeout(function() {
  46. clickAutopilot();
  47. if (REPEAT) setTimeout(connect, DELAY);
  48. }, 750);
  49. }, DELAY);
  50. }, 750);
  51. }, 750);
  52. }
  53.  
  54. connect();
  55.  
  56. REPEAT = false;
  57.  
  58. DELAY = 2 * 60 * 1000;