F95Zone Developer Search

Adds a button to search for the developer on f95zone

29.05.2024 itibariyledir. En son verisyonu görün.

Bu betiği kurabilmeniz için Tampermonkey, Greasemonkey ya da Violentmonkey gibi bir kullanıcı betiği eklentisini kurmanız gerekmektedir.

Bu betiği kurabilmeniz için Tampermonkey ya da Violentmonkey gibi bir kullanıcı betiği eklentisini kurmanız gerekmektedir.

Bu betiği kurabilmeniz için Tampermonkey ya da Violentmonkey gibi bir kullanıcı betiği eklentisini kurmanız gerekmektedir.

Bu betiği kurabilmeniz için Tampermonkey ya da Userscripts gibi bir kullanıcı betiği eklentisini kurmanız gerekmektedir.

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

Bu komut dosyasını yüklemek için bir kullanıcı komut dosyası yöneticisi uzantısı yüklemeniz gerekecek.

(Zaten bir kullanıcı komut dosyası yöneticim var, kurmama izin verin!)

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.

(Zateb bir user-style yöneticim var, yükleyeyim!)

// ==UserScript==
// @name         F95Zone Developer Search
// @namespace    http://tampermonkey.net/
// @version      1.0
// @description  Adds a button to search for the developer on f95zone
// @author       FunkyJustin
// @license      MIT
// @match        https://f95zone.to/threads/*
// @icon         https://www.google.com/s2/favicons?sz=64&domain=f95zone.to
// @grant        none
// ==/UserScript==

(function() {
    'use strict';

    // Function to create the search button
    function createSearchButton(developerName) {
        const button = document.createElement('button');
        button.innerText = 'Search Developer';
        button.style.marginLeft = '10px';
        button.style.cursor = 'pointer';
        button.onclick = function() {
            const searchUrl = `https://f95zone.to/sam/latest_alpha/#/cat=games/page=1/creator=${developerName}`;
            window.open(searchUrl, '_blank');
        };
        return button;
    }

    // Find the title element
    const titleElement = document.querySelector('.p-title h1.p-title-value');
    if (titleElement) {
        // Extract the developer's name
        const titleText = titleElement.innerText;
        const developerMatch = titleText.match(/\[([^\]]+)\]$/);
        if (developerMatch) {
            const developerName = developerMatch[1];
            const searchButton = createSearchButton(developerName);

            // Append the button next to the title
            titleElement.appendChild(searchButton);
        }
    }
})();