Google Restore Underline

Restores underlining to Google title results.

K instalaci tototo skriptu si budete muset nainstalovat rozšíření jako Tampermonkey, Greasemonkey nebo Violentmonkey.

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

K instalaci tohoto skriptu si budete muset nainstalovat rozšíření jako Tampermonkey nebo Violentmonkey.

K instalaci tohoto skriptu si budete muset nainstalovat rozšíření jako Tampermonkey nebo Userscripts.

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

K instalaci tohoto skriptu si budete muset nainstalovat manažer uživatelských skriptů.

(Už mám manažer uživatelských skriptů, nechte mě ho nainstalovat!)

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.

(Už mám manažer uživatelských stylů, nechte mě ho nainstalovat!)

// ==UserScript==
// @name Google Restore Underline
// @namespace GRU
// @description Restores underlining to Google title results.
// @version 125
// @run-at  document-body
// @include http://www.google.*/*
// @include https://www.google.*/*
// @require http://ajax.googleapis.com/ajax/libs/jquery/1.9.1/jquery.min.js
// @author  drhouse
// @icon    https://cdn1.iconfinder.com/data/icons/company-identity/100/new-google-favicon-128.png
// ==/UserScript==

$(document).ready(function () {
    // Target h3 elements within the main search results area
    // Using multiple selectors to cover different Google layouts
    $('#search h3, #rso h3, main h3, #res h3, #botstuff h3').css('text-decoration', 'underline');

    // Use MutationObserver to handle dynamically loaded content (infinite scroll, etc.)
    const observer = new MutationObserver(function(mutations) {
        $('#search h3, #rso h3, main h3, #res h3, #botstuff h3').css('text-decoration', 'underline');
    });

    const searchContainer = document.querySelector('#search, #rso, main, #res');
    if (searchContainer) {
        observer.observe(searchContainer, { childList: true, subtree: true });
    }
});