跳到正文

个人记录

喵喵喵(?

Forever_Rain约 5 分钟
原文
文章信息与版本

文章信息

收录
2026年6月20日
更新
2026年7月25日
篇幅
约 5 分钟

版本

  1. v2当前
  2. v1

插件喵,效果请自己观察喵!

JavaScript
// ==UserScript==
// @name         喵喵喵
// @namespace    http://tampermonkey.net/
// @version       4.0
// @description  喵!
// @author       Forever_Rain
// @match        *://*/*
// @grant        none
// ==/UserScript==

(function() {
    'use strict';
    // 可选文字池,可以改为你希望显示的文字
    const textop = ['喵', '喵~', '喵?', '喵!'];
    // 可选颜色池,可以改为你希望显示的颜色
    const col = [
        '#FF6B81', // 红
        '#4ECDC4', // 绿
        '#FFE66D', // 黄
        '#A29BFE', // 紫
        '#FD79A8', // 粉
        '#74B9FF', // 蓝
        '#FDCB6E', // 黄2
        '#E17055', // 橙
        '#00CEC9', // 蓝2
        '#6C5CE7'  // 紫2
    ];
    document.addEventListener('click', function(e) {
        const text = textop[Math.floor(Math.random() * textop.length)];
        const color = col[Math.floor(Math.random() * col.length)];
        const m = document.createElement('div');
        m.textContent = text;
        m.style.cssText = `
            position: fixed;
            left: ${e.clientX}px;
            top: ${e.clientY}px;
            font-size: 10px;
            font-weight: bold;
            color: ${color};
            font-family: 'Comic Sans MS', 'PingFang SC', 'Microsoft YaHei', cursive;
            pointer-events: none;
            z-index: 999999;
            user-select: none;
            background: rgba(255, 255, 255, 0.8);
            border: 1.5px solid ${color};
            border-radius: 8px;
            padding: 2px 6px;
            box-shadow: 0 2px 10px rgba(0,0,0,0.12), 0 0 0 1px rgba(255,255,255,0.2) inset;
            transform: translate(-50%, -50%) scale(0.5);
            opacity: 0;
            transition: none;
            letter-spacing: 1px;
            backdrop-filter: blur(1px);
            white-space: nowrap;
        `;
        document.body.appendChild(m);
        requestAnimationFrame(() => {
            m.style.transition = 'all 0.6s cubic-bezier(0.34, 1.56, 0.64, 1)';
            m.style.transform = 'translate(-50%, -50%) scale(1)';
            m.style.opacity = '1';
        });
        setTimeout(() => {
            m.style.transition = 'all 0.7s ease-out';
            m.style.transform = 'translate(-50%, -140%) scale(0.9)';
            m.style.opacity = '0';
        }, 400);
        setTimeout(() => {
            if (m.parentNode) {
                m.remove();
            }
        }, 1200);
    });
})();
原文