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.

Tính đến 05-08-2025. Xem phiên bản mới nhất.

You will need to install an extension such as Tampermonkey, Greasemonkey or Violentmonkey to install this script.

Bạn sẽ cần cài đặt một tiện ích mở rộng như Tampermonkey hoặc Violentmonkey để cài đặt kịch bản này.

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.

(Tôi đã có Trình quản lý tập lệnh người dùng, hãy cài đặt nó!)

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');
                }
            });
        });
    })();