一键获取Cookie

创建于 1 天前
更新于 1 天前
可拖动悬浮按钮,一键获取Cookie,无多余提示,展开按钮右对齐(HttpOnly类型无法获取)
总安装量
26
今日新增
+1
用户评分
5.0 / 5.0 (1)
当前版本
1.1
脚本详情
适用网站

一键获取Cookie脚本 | One-Click Cookie Getter

一款轻量、易用的油猴(Tampermonkey)脚本,为你提供一键获取网站Cookie的能力,支持悬浮按钮自由拖动,无多余干扰提示。
A lightweight and easy-to-use Tampermonkey script that allows you to get website cookies with one click. The floating button is draggable with no extra annoying prompts.


✨ 核心特性 | Core Features

  1. 可拖动悬浮按钮:按钮默认固定在页面右上角,支持自由拖动到任意位置,不遮挡页面核心内容
    Draggable Floating Button: Fixed at the top-right corner by default, can be freely dragged to any position without blocking page content
  2. 一键复制功能:点击按钮即可自动将当前网站Cookie复制到剪贴板,无需手动操作
    One-Click Copy: Click the button to automatically copy the current website’s cookie to clipboard with no manual operation
  3. 自定义友好弹窗:获取成功后弹出暗色主题弹窗,仅展示核心信息,无多余广告或提示
    Custom Clean Popup: Dark-themed popup shows only key info after success, no ads or redundant messages
  4. 长Cookie展开/收起:Cookie内容过长时自动截断,支持右对齐按钮展开查看完整内容
    Expand/Collapse Long Cookies: Automatically truncates long cookies, with a right-aligned button to view full content
  5. 全网站适配:支持所有HTTP/HTTPS网站,自动在所有匹配页面加载按钮
    Universal Compatibility: Works on all HTTP/HTTPS websites, loads automatically on every matched page
  6. 轻量无依赖:纯原生JS实现,无额外第三方依赖,加载速度快
    Lightweight & No Dependencies: Pure native JavaScript, no third-party libraries, fast loading
QQ20260508-223037

🚀 安装与使用 | Installation & Usage

安装步骤 | Installation Steps

  1. 首先在浏览器中安装 Tampermonkey(油猴) 插件
    First install the Tampermonkey extension in your browser
  2. 打开Tampermonkey管理面板,选择「导入脚本」,上传本JS文件
    Open Tampermonkey Dashboard → Import Script → Upload this JS file
  3. 启用脚本后刷新任意网页即可看到右上角的悬浮按钮
    Enable the script and refresh any webpage to see the floating button at top-right

使用方法 | How to Use

  • 获取Cookie:点击「获取Cookie」按钮,Cookie将自动复制到剪贴板并弹出结果弹窗
    Get Cookie: Click the button to copy cookie to clipboard and show result popup
  • 调整按钮位置:按住按钮拖动即可自由移动到页面任意位置
    Move Button: Drag the button to any position on the screen
  • 查看完整Cookie:在弹窗中点击「展开查看完整」即可查看全部Cookie内容
    View Full Cookie: Click “Expand” in the popup to see complete cookie content

⚠️ 注意事项 | Important Notes

  • 受浏览器安全机制限制,HttpOnly类型的Cookie无法通过JavaScript获取,这是正常的安全限制
    Due to browser security restrictions, HttpOnly cookies cannot be accessed by JavaScript — this is normal and safe
  • 脚本仅在本地运行,不会上传任何Cookie数据,所有操作均在浏览器本地完成
    This script runs locally only and never uploads any cookie data. All operations happen in your browser