IO Game Retexture

Retexture images in IO games with a click of a button

当前为 2024-07-11 提交的版本,查看 最新版本

// ==UserScript==
// @name         IO Game Retexture
// @namespace    http://tampermonkey.net/
// @version      0.1
// @description  Retexture images in IO games with a click of a button
// @author       Your Name
// @match        *://*.iogameurl.com/*
// @grant        none
// ==/UserScript==

(function() {
    'use strict';

    // Add the retexture button
    const retextureButton = document.createElement('button');
    retextureButton.innerHTML = 'Retexture!';
    retextureButton.style.position = 'fixed';
    retextureButton.style.top = '10px';
    retextureButton.style.right = '10px';
    retextureButton.style.zIndex = '9999';
    retextureButton.style.border = '2px solid black';
    retextureButton.style.backgroundColor = 'white';
    retextureButton.style.color = 'black';
    retextureButton.style.padding = '10px';
    retextureButton.style.cursor = 'pointer';
    document.body.appendChild(retextureButton);

    // Add click event listener to the button
    retextureButton.addEventListener('click', () => {
        // Get all images on the page
        const images = document.querySelectorAll('img');
        
        // Loop through each image and change its texture
        images.forEach(img => {
            img.src = 'https://example.com/new_texture.png'; // Replace with the URL of your new texture
        });

        // You can also change the background image of certain elements
        const elementsWithBackgroundImage = document.querySelectorAll('[style*="background-image"]');
        elementsWithBackgroundImage.forEach(element => {
            element.style.backgroundImage = 'url(https://example.com/new_texture.png)'; // Replace with the URL of your new texture
        });
    });
})();

QingJ © 2025

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