您需要先安装一个扩展,例如 篡改猴、Greasemonkey 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 Userscripts ,之后才能安装此脚本。
您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey,才能安装此脚本。
您需要先安装用户脚本管理器扩展后才能安装此脚本。
Makes doggo's eyes follow the cursor.
// ==UserScript== // @name Kagi doggo xeyes // @namespace http://kagi.com/ // @version 2025-08-12 // @description Makes doggo's eyes follow the cursor. // @author jacobwinters // @match https://kagi.com/ // @grant none // ==/UserScript== // Nerd sniped by https://x.com/SambitBiswas/status/1955022904871043218 (function () { "use strict"; addEventListener("mousemove", (e) => { for (let pupil of document.querySelectorAll(".pupil")) { if (!pupil.oldCx) { pupil.oldCx = pupil.cx.baseVal.value; pupil.oldCy = pupil.cy.baseVal.value; pupil.style.translate = "0"; } let eye = pupil.previousElementSibling.previousElementSibling; eye.setAttribute("stroke-width", "8"); let pointer = DOMPoint.fromPoint({ x: e.clientX, y: e.clientY }).matrixTransform(pupil.closest("svg").getScreenCTM().inverse()); let c; let f = 0.5; for (let i = 0; i < 16; i++) { c = [(pupil.oldCx + 1) * f + pointer.x * (1 - f), (pupil.oldCy - 5) * f + pointer.y * (1 - f)]; if (!eye.isPointInFill({ x: c[0], y: c[1] }) || eye.isPointInStroke(({ x: c[0], y: c[1] }))) { f += 0.25 / 2 ** i; } else { f -= 0.25 / 2 ** i; } } pupil.setAttribute("cx", c[0]); pupil.setAttribute("cy", c[1]); eye.setAttribute("stroke-width", "2"); } }); })();