Show Bumble Votes

show how your encounters voted on you before you swipe

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

// ==UserScript==
// @name        Show Bumble Votes
// @namespace   https://habs.sdf.org/
// @match       https://bumble.com/app
// @grant       none
// @version     1.0
// @author      habs
// @description show how your encounters voted on you before you swipe
// @run-at      document-idle
// @license     AGPLv3
// ==/UserScript==

const encs = [];
(function(open) {
  XMLHttpRequest.prototype.open = function() {
    this.addEventListener("readystatechange", function() {
      if (this.readyState !== 4) return;
      if (this.responseURL !== "https://bumble.com/mwebapi.phtml?SERVER_GET_ENCOUNTERS") return;
      const resp = JSON.parse(this.responseText);
      encs.push(...resp.body[0].client_encounters.results);
    }, false);
    open.apply(this, arguments);
  };
})(XMLHttpRequest.prototype.open);

const userIds = [];
window.setInterval(() => {
  const hdr = document.querySelector('.encounters-story-profile__header');
  if (!hdr) return;
  if (hdr.parentElement.querySelector('.showBumbleVotes')) return;
  const name = document.querySelector('.encounters-story-profile__name')?.innerText;
  const age = +document.querySelector('.encounters-story-profile__age')?.innerText.replace(',', '').trim();
  const enc = encs.find(enc => enc.user.name === name && enc.user.age === age);
  if (!enc) return;
  userIds.push({ name, id: enc.user.user_id });
  console.log(userIds);
  const div = document.createElement('div');
  div.classList.add('showBumbleVotes');
  const vote = enc.user.their_vote;
  div.innerHTML = vote === 1 ? 'Not voted!' : vote === 2 ? 'Swiped right!' : vote === 3 ? 'Swiped left!' : 'Unknown!';
  hdr.after(div);
}, 1000);

QingJ © 2025

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