adbtc.top

https://www.youtube.com/channel/UCm2XoBbuIVSgMagy3Q01tSw

  1. // ==UserScript==
  2. // @name adbtc.top
  3. // @namespace https://adbtc.top/
  4. // @version 1.3
  5. // @description https://www.youtube.com/channel/UCm2XoBbuIVSgMagy3Q01tSw
  6. // @author Laravandro
  7. // @match https://adbtc.top/surf/browse/*
  8. // @match https://adbtc.top/surfiat/browse/*
  9. // @icon https://www.google.com/s2/favicons?domain=adbtc.top
  10. // @grant none
  11. // @run-at document-end
  12. // @license MIT
  13. // ==/UserScript==
  14.  
  15. (function () {
  16. 'use strict';
  17.  
  18. // Your code here...
  19. const USER_ID = document.querySelector(".nomargbot > div.col.s6.l3.m3.left.hide-on-small-only > p > b").innerText
  20. const BTC = "/surf/"
  21. const RUB = "/surfiat/"
  22. var flag = true
  23. var timer = 120
  24.  
  25. setInterval(() => {
  26. document.title = timer
  27. var current_url = window.location.href
  28. if (timer <= 110 && (document.getElementById("cf-wrapper") || document.title.includes("500") || document.title.includes("502") || document.title.includes("504") || document.title.includes("525")))
  29. window.open(window.location.href, "_self")
  30.  
  31. if (flag && timer <= 110 && !document.querySelector("form") && document.querySelector("div > div > span > b")) {
  32. flag = false
  33. send_message(document.querySelector("div > div > span > b").innerText)
  34. if (current_url.includes(BTC)) execute("/surf")
  35. else if (current_url.includes(RUB)) execute("/surfiat")
  36.  
  37. } else if (flag && timer <= 100 && current_url.includes(BTC) && !document.querySelector("form") && !document.querySelector("div > div > span > b")) {
  38. flag = false
  39. window.open("https://adbtc.top/surfiat/browse/" + USER_ID, "_self")
  40.  
  41. } else if (flag && timer <= 90 && current_url.includes(RUB) && !document.querySelector("form") && !document.querySelector("div > div > span > b")) {
  42. flag = false
  43. window.open("https://adbtc.top/surf/browse/" + USER_ID, "_self")
  44.  
  45. } else if (flag && timer <= 0) {
  46. console.log("ready to reload")
  47. flag = false
  48. window.open("https://adbtc.top/surf/browse/" + USER_ID, "_self")
  49. } timer--
  50. }, 1000)
  51.  
  52. function execute(surf) {
  53. // var price = parseFloat(document.querySelector("div > div > span > b").innerText.match(/-?(?:\d+(?:\.\d*)?|\.\d+)/)[0])
  54. var skip_url = document.getElementById("skip").href
  55.  
  56. grecaptcha.execute('6LdpDHoUAAAAALczQElnsxkH1IUz3Lfdz2E8rV9j', { action: 'surftator' }).then(function (token) {
  57. href = surf + "/ihumano/" + skip_url.substring(skip_url.lastIndexOf('/') + 1)
  58.  
  59. var xhr = new XMLHttpRequest()
  60. xhr.open("POST", href, true)
  61. xhr.setRequestHeader("X-Requested-With", "XMLHttpRequest");
  62.  
  63. xhr.onreadystatechange = function () {
  64. if (this.readyState == 4 && this.status == 200) {
  65. // if (this.responseText == 'ok') send_message(price)
  66. window.open("https://adbtc.top/surf/browse/" + USER_ID, "_self")
  67. }
  68. }
  69. xhr.send(JSON.stringify({
  70. gtoken: token
  71. }));
  72.  
  73. }, function () { })
  74. }
  75.  
  76. async function send_message(price) {
  77. var token = "YOUR-TOKEN"
  78. var chat_id = 0
  79.  
  80. var message = "<b>%20%23adbtc</b>%0AUser ID : <b>%20%23" + USER_ID + "</b>%0ATotal BTC : " + document.querySelector(".balance > p > b:nth-child(2)").innerText + "%0ATotal RUBEL : " + document.querySelector(".balance > p > b:nth-child(5)").innerText + "%0ANext : " + price
  81.  
  82. var telegram_url = `https://api.telegram.org/bot${token}/sendMessage?chat_id=${chat_id}&text=${message}&parse_mode=html`
  83. var api = new XMLHttpRequest()
  84. api.open("GET", telegram_url, true)
  85. api.send()
  86. var a = setInterval(() => {
  87. if (api.status == 200 || timer <= 0) {
  88. window.open("https://adbtc.top/surf/browse/" + USER_ID, "_self")
  89. clearInterval(a)
  90. }
  91. }, 1000)
  92. }
  93.  
  94.  
  95. })();