Tinder Unblur

Unblur Tinder teaser images

  1. // ==UserScript==
  2. // @name Tinder Unblur
  3. // @namespace http://tampermonkey.net/
  4. // @version 1.2
  5. // @description Unblur Tinder teaser images
  6. // @author You
  7. // @match https://tinder.com/*
  8. // @grant none
  9. // @license MIT
  10. // ==/UserScript==
  11. (function() {
  12. 'use strict';
  13.  
  14. function waitForElement(selector, callback) {
  15. const interval = setInterval(() => {
  16. if (document.querySelector(selector)) {
  17. clearInterval(interval);
  18. callback();
  19. }
  20. }, 100);
  21. }
  22.  
  23. async function unblur() {
  24. const teasers = await fetch("https://api.gotinder.com/v2/fast-match/teasers", {
  25. headers: {
  26. "X-Auth-Token": localStorage.getItem("TinderWeb/APIToken"),
  27. platform: "android",
  28. },
  29. })
  30. .then((res) => res.json())
  31. .then((res) => res.data.results);
  32.  
  33. const teaserEls = document.querySelectorAll(
  34. ".Expand.enterAnimationContainer > div:nth-child(1)"
  35. );
  36.  
  37. // Check if the length of teaserEls matches teasers array length
  38. teasers.forEach((teaser, index) => {
  39. const teaserEl = teaserEls[index];
  40. // Ensure teaserEl exists before trying to modify it
  41. if (teaserEl) {
  42. const teaserImage = `https://preview.gotinder.com/${teaser.user._id}/original_${teaser.user.photos[0].id}.jpeg`;
  43. teaserEl.style.backgroundImage = `url(${teaserImage})`;
  44. } else {
  45. console.warn(`No matching element for teaser at index ${index}`);
  46. }
  47. });
  48. }
  49.  
  50. // Wait for the elements to be present before executing unblur
  51. waitForElement(".Expand.enterAnimationContainer > div:nth-child(1)", unblur);
  52.  
  53. })();