Re-direct to main game website (IOGames.space) - Updated for 2025

Re-directs games from iogames.space to their main website.

You will need to install an extension such as Tampermonkey, Greasemonkey or Violentmonkey to install this script.

You will need to install an extension such as Tampermonkey to install this script.

You will need to install an extension such as Tampermonkey or Violentmonkey to install this script.

You will need to install an extension such as Tampermonkey or Userscripts to install this script.

You will need to install an extension such as Tampermonkey to install this script.

You will need to install a user script manager extension to install this script.

(I already have a user script manager, let me install it!)

You will need to install an extension such as Stylus to install this style.

You will need to install an extension such as Stylus to install this style.

You will need to install an extension such as Stylus to install this style.

You will need to install a user style manager extension to install this style.

You will need to install a user style manager extension to install this style.

You will need to install a user style manager extension to install this style.

(I already have a user style manager, let me install it!)

// ==UserScript==
// @name         Re-direct to main game website (IOGames.space) - Updated for 2025
// @version      2.2.0
// @description  Re-directs games from iogames.space to their main website.
// @author       TigerYT
// @match        *://iogames.space/*
// @icon         https://iogames.space/images/app/favicon-48.png
// @grant        none
// @run-at       context-menu
// @namespace    https://greasyfork.org/users/137913
// ==/UserScript==

document.querySelector(".GamePlayer__Overlay .GamePlayer__Overlay button")?.click();

const observer = new MutationObserver(() => {
  const button = document.querySelector(".GamePlayer__Overlay .GamePlayer__Overlay button");
  if (button) button.click();

  const objectElement = document.getElementsByTagName('object')[0];
  if (objectElement && objectElement.data) window.location.replace(objectElement.data);
});

observer.observe(document.body, {
  childList: true,
  subtree: true
});