Tinder Unblur with Names

Unblur Tinder fast match teasers and show names

  1. // ==UserScript==
  2. // @name Tinder Unblur with Names
  3. // @namespace http://tampermonkey.net/
  4. // @version 1.2
  5. // @description Unblur Tinder fast match teasers and show names
  6. // @match https://tinder.com/*
  7. // @grant none
  8. // @license MIT
  9. // ==/UserScript==
  10.  
  11. (function() {
  12. 'use strict';
  13.  
  14. function getAuthToken() {
  15. return localStorage.getItem("TinderWeb/APIToken");
  16. }
  17.  
  18. async function unblur() {
  19. const authToken = getAuthToken();
  20. if (!authToken) {
  21. console.error("Tinder Unblur: Auth token not found.");
  22. return;
  23. }
  24.  
  25. try {
  26. const response = await fetch("https://api.gotinder.com/v2/fast-match/teasers", {
  27. headers: {
  28. "X-Auth-Token": authToken,
  29. "Platform": "android",
  30. "Content-Type": "application/json",
  31. },
  32. });
  33.  
  34. if (!response.ok) {
  35. console.error(`Tinder Unblur: Fetch error - ${response.statusText}`);
  36. return;
  37. }
  38.  
  39. const data = await response.json();
  40. const teasers = data?.data?.results;
  41.  
  42. if (!teasers || !Array.isArray(teasers)) {
  43. console.error("Tinder Unblur: Invalid teaser data.");
  44. return;
  45. }
  46.  
  47. const teaserEls = document.querySelectorAll(
  48. ".Expand.enterAnimationContainer > div:nth-child(1)"
  49. );
  50.  
  51. teasers.forEach((teaser, index) => {
  52. const teaserEl = teaserEls[index];
  53. if (teaserEl && teaser.user && teaser.user.photos && teaser.user.photos.length > 0) {
  54. const photo = teaser.user.photos[0];
  55. const teaserImage = `https://preview.gotinder.com/${teaser.user._id}/original_${photo.id}.jpeg`;
  56. teaserEl.style.backgroundImage = `url(${teaserImage})`;
  57. teaserEl.style.filter = 'none';
  58.  
  59. // Añadir el nombre
  60. const nameDiv = document.createElement('div');
  61. nameDiv.textContent = teaser.user.name || "Sin nombre";
  62. nameDiv.style.position = 'absolute';
  63. nameDiv.style.bottom = '10px';
  64. nameDiv.style.left = '10px';
  65. nameDiv.style.backgroundColor = 'rgba(0, 0, 0, 0.7)';
  66. nameDiv.style.color = 'white';
  67. nameDiv.style.padding = '5px 10px';
  68. nameDiv.style.borderRadius = '5px';
  69. nameDiv.style.fontSize = '14px';
  70. nameDiv.style.fontWeight = 'bold';
  71. nameDiv.style.zIndex = '1000';
  72.  
  73. // Añadir edad si está disponible
  74. if (teaser.user.birth_date) {
  75. const age = new Date().getFullYear() - new Date(teaser.user.birth_date).getFullYear();
  76. nameDiv.textContent += `, ${age}`;
  77. }
  78.  
  79. // Remover cualquier nombre existente antes de añadir el nuevo
  80. const existingName = teaserEl.querySelector('.tinder-name-overlay');
  81. if (existingName) {
  82. existingName.remove();
  83. }
  84.  
  85. nameDiv.classList.add('tinder-name-overlay');
  86. teaserEl.appendChild(nameDiv);
  87. }
  88. });
  89.  
  90. console.log("Tinder Unblur: Images unblurred and names added successfully.");
  91. } catch (error) {
  92. console.error("Tinder Unblur: Error during unblur process.", error);
  93. }
  94. }
  95.  
  96. window.addEventListener('load', () => {
  97. setTimeout(unblur, 3000);
  98. });
  99.  
  100. const observer = new MutationObserver((mutations) => {
  101. for (const mutation of mutations) {
  102. if (mutation.type === 'childList' && mutation.addedNodes.length > 0) {
  103. unblur();
  104. }
  105. }
  106. });
  107.  
  108. const targetNode = document.body;
  109. const config = { childList: true, subtree: true };
  110. observer.observe(targetNode, config);
  111.  
  112. const unblurButton = document.createElement('button');
  113. unblurButton.textContent = 'Desbloquear Imágenes y Mostrar Nombres';
  114. unblurButton.style.position = 'fixed';
  115. unblurButton.style.top = '10px';
  116. unblurButton.style.left = '50%';
  117. unblurButton.style.transform = 'translateX(-50%)';
  118. unblurButton.style.zIndex = '9999';
  119. unblurButton.style.backgroundColor = '#FE3C72';
  120. unblurButton.style.color = '#FFFFFF';
  121. unblurButton.style.border = 'none';
  122. unblurButton.style.borderRadius = '20px';
  123. unblurButton.style.padding = '10px 20px';
  124. unblurButton.style.fontSize = '16px';
  125. unblurButton.style.cursor = 'pointer';
  126. unblurButton.style.boxShadow = '0 4px 8px rgba(0, 0, 0, 0.2)';
  127. unblurButton.style.transition = 'background-color 0.3s ease, transform 0.3s ease';
  128.  
  129. unblurButton.addEventListener('mouseover', function() {
  130. unblurButton.style.backgroundColor = '#FF6B81';
  131. unblurButton.style.transform = 'translateX(-50%) scale(1.05)';
  132. });
  133.  
  134. unblurButton.addEventListener('mouseout', function() {
  135. unblurButton.style.backgroundColor = '#FE3C72';
  136. unblurButton.style.transform = 'translateX(-50%) scale(1)';
  137. });
  138.  
  139. unblurButton.addEventListener('click', () => {
  140. unblur();
  141. unblurButton.textContent = '¡Desbloqueado!';
  142. setTimeout(() => {
  143. unblurButton.textContent = 'Desbloquear Imágenes y Mostrar Nombres';
  144. }, 2000);
  145. });
  146.  
  147. document.body.appendChild(unblurButton);
  148. })();