Replace NixOS colorful Logo

This script is for people who have trouble focusing on colorful icons, it replaces the icons with the NixOS theme color.

Ajankohdalta 5.8.2025. Katso uusin versio.

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 or Violentmonkey 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        Replace NixOS colorful Logo
// @name:zh-CN  替换 NixOS 多彩图标
// @namespace   http://tampermonkey.net/
// @match       https://search.nixos.org/*
// @grant       none
// @description This script is for people who have trouble focusing on colorful icons, it replaces the icons with the NixOS theme color.
// @description:zh-CN 此脚本适用于难以关注彩色图标的人,它用 NixOS 主题颜色替换图标。
// @version 0.0.2
// ==/UserScript==
     
    (function() {
        'use strict';
     
        document.addEventListener('DOMContentLoaded', function() {
            const images = document.querySelectorAll('img');
     
            images.forEach(img => {
                if (img.src.includes('/images/nix-logo-pride.png')) {
                    img.src = img.src.replace('/images/nix-logo-pride.png', '/images/nix-logo.png');
                }
            });
        });
    })();