Greasy Fork | Quick Copy/Download/Install Script Buttons

Adds Copy, Download, and Install buttons to every search result tile and script page header.

您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey 篡改猴Greasemonkey 油猴子Violentmonkey 暴力猴,才能安装此脚本。

您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey 篡改猴,才能安装此脚本。

您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey 篡改猴Violentmonkey 暴力猴,才能安装此脚本。

您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey 篡改猴Userscripts ,才能安装此脚本。

您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey 篡改猴,才能安装此脚本。

您需要先安装一款用户脚本管理器扩展后才能安装此脚本。

(我已经安装了用户脚本管理器,让我安装!)

您需要先安装一款用户样式管理器扩展,比如 Stylus,才能安装此样式。

您需要先安装一款用户样式管理器扩展,比如 Stylus,才能安装此样式。

您需要先安装一款用户样式管理器扩展,比如 Stylus,才能安装此样式。

您需要先安装一款用户样式管理器扩展后才能安装此样式。

您需要先安装一款用户样式管理器扩展后才能安装此样式。

您需要先安装一款用户样式管理器扩展后才能安装此样式。

(我已经安装了用户样式管理器,让我安装!)

作者
piknockyou
日安装量
0
总安装量
1
评分
0 0 0
版本
1.2
创建于
2025-12-27
更新于
2025-12-27
大小
19.1 KB
许可证
AGPL-3.0
适用于

See screenshots at the bottom

Greasy Fork | Quick Copy/Download/Install Script

Adds Copy, Download, and Install buttons to every search result tile and script page header for instant script management without page navigation.

Why You Need This

Managing userscripts on Greasy Fork requires multiple clicks and page loads:

  • Navigation overhead: Must open individual script pages to access code.
  • Installation friction: Can't quickly install from search results.
  • No archival tools: No built-in way to download scripts for backup or offline review.

This script adds three one-click actions directly to search results and script headers.

Key Features

  • Copy Code: Instantly fetch and copy the full .user.js source to your clipboard without loading the code page.
  • Download File: Save the script locally as a .user.js file for archiving or manual review.
  • Quick Install: Trigger the standard installation prompt directly from search results.
  • Visual Feedback: Loading spinners, success checkmarks, and clear tooltips for each action.
  • Universal Support: Works on search results, user profiles, script info pages, and code view pages.
  • Theme Compatible: Seamlessly integrates with both Light and Dark modes.

How to Use

Action Result
Click Copy button Fetch and copy script source to clipboard
Click Download button Save script as .user.js file
Click Install button Navigate to userscript installation prompt

Buttons appear in the top-right corner of each search result tile and in script page headers.

Performance Notes

  • Efficient detection: Uses MutationObserver to only process newly added script tiles (no full-page rescans).
  • Debounced updates: 100ms debounce prevents excessive processing during rapid DOM changes.
  • SPA-aware: Automatically re-injects buttons after navigation to handle Greasy Fork's dynamic routing.

Installation

  1. Install Violentmonkey (recommended), Tampermonkey, or Greasemonkey.
  2. Install this script.
  3. Visit greasyfork.org.

Works immediately. Buttons appear on all script tiles and pages.

Technical Details

  • Fetch method: Uses GM_xmlhttpRequest to bypass CORS and fetch script source reliably.
  • Clipboard API: Uses GM_setClipboard with navigator clipboard fallback.
  • Styling: Color-coded buttons (Blue = Copy, Green = Download, Red = Install) with hover effects.
  • Dark mode: Automatic detection via prefers-color-scheme and Greasy Fork's native theme classes.