Show Bumble Votes

show how your encounters voted on you before you swipe

目前为 2022-03-05 提交的版本。查看 最新版本

  1. // ==UserScript==
  2. // @name Show Bumble Votes
  3. // @namespace https://habs.sdf.org/
  4. // @match https://bumble.com/app
  5. // @grant none
  6. // @version 1.0
  7. // @author habs
  8. // @description show how your encounters voted on you before you swipe
  9. // @run-at document-idle
  10. // @license AGPLv3
  11. // ==/UserScript==
  12.  
  13. const encs = [];
  14. (function(open) {
  15. XMLHttpRequest.prototype.open = function() {
  16. this.addEventListener("readystatechange", function() {
  17. if (this.readyState !== 4) return;
  18. if (this.responseURL !== "https://bumble.com/mwebapi.phtml?SERVER_GET_ENCOUNTERS") return;
  19. const resp = JSON.parse(this.responseText);
  20. encs.push(...resp.body[0].client_encounters.results);
  21. }, false);
  22. open.apply(this, arguments);
  23. };
  24. })(XMLHttpRequest.prototype.open);
  25.  
  26. const userIds = [];
  27. window.setInterval(() => {
  28. const hdr = document.querySelector('.encounters-story-profile__header');
  29. if (!hdr) return;
  30. if (hdr.parentElement.querySelector('.showBumbleVotes')) return;
  31. const name = document.querySelector('.encounters-story-profile__name')?.innerText;
  32. const age = +document.querySelector('.encounters-story-profile__age')?.innerText.replace(',', '').trim();
  33. const enc = encs.find(enc => enc.user.name === name && enc.user.age === age);
  34. if (!enc) return;
  35. userIds.push({ name, id: enc.user.user_id });
  36. console.log(userIds);
  37. const div = document.createElement('div');
  38. div.classList.add('showBumbleVotes');
  39. const vote = enc.user.their_vote;
  40. div.innerHTML = vote === 1 ? 'Not voted!' : vote === 2 ? 'Swiped right!' : vote === 3 ? 'Swiped left!' : 'Unknown!';
  41. hdr.after(div);
  42. }, 1000);

QingJ © 2025

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