Sleazy Fork is available in English.

Steam Search Button for F95Zone (Deprecated)

Add a button to search Google using the title of the game on F95Zone, to see if it has been released on Steam

  1. // ==UserScript==
  2. // @name Steam Search Button for F95Zone (Deprecated)
  3. // @namespace http://tampermonkey.net/
  4. // @version 0.3.1
  5. // @description Add a button to search Google using the title of the game on F95Zone, to see if it has been released on Steam
  6. // @author FunkyJustin
  7. // @match https://f95zone.to/threads/*
  8. // @grant none
  9. // @license MIT
  10. // ==/UserScript==
  11.  
  12. (function() {
  13. 'use strict';
  14.  
  15. // Function to search Google with the game title on Steam
  16. function searchSteamForTitle() {
  17. // Get the game title text
  18. var gameTitleElement = document.querySelector('h1.p-title-value');
  19. var gameTitle = gameTitleElement.textContent.trim();
  20.  
  21. // Remove elements with the class "label"
  22. var labels = gameTitleElement.querySelectorAll('.label');
  23. labels.forEach(function(label) {
  24. label.remove();
  25. });
  26.  
  27. // Get the modified game title
  28. var gameTitleForSearch = gameTitleElement.textContent.trim();
  29.  
  30. // Remove everything inside square brackets and the brackets themselves for the search query
  31. gameTitleForSearch = gameTitleForSearch.replace(/\[.*?\]/g, '');
  32.  
  33. // Construct the Google search URL
  34. var searchQuery = encodeURIComponent(gameTitleForSearch + ' site:store.steampowered.com');
  35. var searchUrl = 'https://www.google.com/search?q=' + searchQuery;
  36.  
  37. // Open the search URL in a new tab
  38. window.open(searchUrl, '_blank');
  39. }
  40.  
  41. // Create and append the search button
  42. var searchButton = document.createElement('button');
  43. searchButton.textContent = 'Search Steam';
  44. searchButton.style.marginLeft = '10px';
  45. searchButton.addEventListener('click', searchSteamForTitle);
  46. var gameTitleContainer = document.querySelector('div.p-title > h1.p-title-value').parentNode;
  47. gameTitleContainer.appendChild(searchButton);
  48. })();