F95 Compressed button

Added a 'compressed' search button

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         F95 Compressed button
// @namespace    http://tampermonkey.net/
// @description  Added a 'compressed' search button
// @version      3
// @author       You
// @match        https://f95zone.to/threads/*
// @icon         https://www.google.com/s2/favicons?sz=64&domain=f95zone.to
// @grant        none
// ==/UserScript==
{

    
    //Ver Compressed
    var button1 = '<input type="button" value="New+Compressed" ' +
        'style="position: fixed; top: 25%; right: 120px; z-index: 9999;line-height: 30px;font-size: 20px; ">';
    jQuery('body').append(button1);
    var labelAppend = document.querySelector('div.p-title h1.p-title-value');
    var match = labelAppend.textContent.match(/\[(.*?)\]/);
    var extractedString = match[1] + ' Compressed';
    jQuery('body').on('click', 'input[type="button"][value="New+Compressed"]', function() {

        const searchInput = document.querySelector('.uix_searchInput');
        if (searchInput) {
            searchInput.value = extractedString;

            const event = new Event('input', { bubbles: true });
            searchInput.dispatchEvent(event);

            const searchButton = document.querySelector('button.button--primary.button--icon--search');
            if (searchButton) {
                searchButton.click();
            }
        }
    });
	
	//Compressed
    var button4 = '<input type="button" value="Compressed" ' +
        'style="position: fixed; top: 30%; right: 120px; z-index: 9999;line-height: 30px;font-size: 20px; ">';
    jQuery('body').append(button4);
    jQuery('body').on('click', 'input[type="button"][value="Compressed"]', function() {
        const searchInput = document.querySelector('.uix_searchInput');
        if (searchInput) {
            searchInput.value = 'Compressed';
            const event = new Event('input', { bubbles: true });
            searchInput.dispatchEvent(event);
            const searchButton = document.querySelector('button.button--primary.button--icon--search');
            if (searchButton) {
                searchButton.click();
            }
        }
    });
}