Greasy Fork Code Copy Button (AFU IT)

Adds a single floating copy button with a notification from code container on Greasy Fork

이 스크립트를 설치하려면 Tampermonkey, Greasemonkey 또는 Violentmonkey와 같은 확장 프로그램이 필요합니다.

이 스크립트를 설치하려면 Tampermonkey와 같은 확장 프로그램을 설치해야 합니다.

이 스크립트를 설치하려면 Tampermonkey 또는 Violentmonkey와 같은 확장 프로그램이 필요합니다.

이 스크립트를 설치하려면 Tampermonkey 또는 Userscripts와 같은 확장 프로그램이 필요합니다.

이 스크립트를 설치하려면 Tampermonkey와 같은 확장 프로그램이 필요합니다.

이 스크립트를 설치하려면 유저 스크립트 관리자 확장 프로그램이 필요합니다.

(이미 유저 스크립트 관리자가 설치되어 있습니다. 설치를 진행합니다!)

이 스타일을 설치하려면 Stylus와 같은 확장 프로그램이 필요합니다.

이 스타일을 설치하려면 Stylus와 같은 확장 프로그램이 필요합니다.

이 스타일을 설치하려면 Stylus와 같은 확장 프로그램이 필요합니다.

이 스타일을 설치하려면 유저 스타일 관리자 확장 프로그램이 필요합니다.

이 스타일을 설치하려면 유저 스타일 관리자 확장 프로그램이 필요합니다.

이 스타일을 설치하려면 유저 스타일 관리자 확장 프로그램이 필요합니다.

(이미 유저 스타일 관리자가 설치되어 있습니다. 설치를 진행합니다!)

작성자
afu-it
일일 설치 수
0
총 설치 수
38
평점
1 0 0
버전
0.1
생성일
2025-05-07
갱신일
2025-05-07
크기
5.86KB
라이선스
MIT
적용 사이트

Description
A userscript that adds a convenient floating copy button to code blocks on Greasy Fork (https://greatest.deepsurf.us/). The button stays visible as you scroll through long code snippets, making it easy to copy code with a single click. When clicked, the button displays a checkmark icon and a minimalist "copied" notification to confirm the action.

Features
- Adds a floating copy button to all code blocks on Greasy Fork
- Button stays visible when scrolling through long code snippets
- Semi-transparent dark button that becomes fully opaque on hover
- Visual feedback with checkmark icon and "copied" text when code is copied
- Automatically works on all pages of Greasy Fork
- Clean, minimalist design that doesn't interfere with the site's appearance

Installation Instructions
Step 1: Install a Userscript Manager
- First, you need a userscript manager extension for your browser:

Chrome: Tampermonkey or Violentmonkey
Firefox: Greasemonkey, Tampermonkey, or Violentmonkey
Edge: Tampermonkey or Violentmonkey
Safari: Tampermonkey or Userscripts

Step 2: Install the Script
- Click on your userscript manager icon in your browser
- Select "Create a new script" or "Add new script"
- Delete any template code
- Copy and paste the entire script code into the editor
- Save the script (Ctrl+S or Command+S)

Step 3: Use the Script
- Visit any page on https://greatest.deepsurf.us/ that contains code blocks
- You'll see a dark, semi-transparent copy button in the top-right corner of each code block
- The button will stay visible as you scroll through the code
- Click the button to copy the entire code to your clipboard
- A checkmark icon and "copied" text will appear briefly to confirm the action

How It Works
- The script identifies all code containers on Greasy Fork pages and adds a floating copy button to each one. When clicked, the button extracts the code content (including handling line numbers) and copies it to your clipboard using the Clipboard API. The button provides visual feedback by changing to acheckmark icon and displaying a minimalist "copied" notification for 2 seconds.

Compatibility
- Works on all major browsers with userscript support
- Tested on Chrome, Firefox, and Edge
- Compatible with Tampermonkey, Violentmonkey, and Greasemonkey

Troubleshooting
- If buttons don't appear, try refreshing the page
- Make sure your userscript manager is enabled for greatest.deepsurf.us
- Check if you have any conflicting scripts or extensions
- If the copy function doesn't work, ensure your browser permissions allow clipboard access

Version History
- v0.1 (Initial release): Basic functionality with floating copy button and visual feedback

==================================================================================

DONATE
- Please donate my hardwork as low as $1 only to my hardwork.
- Ethereum (ERC20) Network, 0xCCB7bce062A47B60939F2f3d7B3d124dEEF4c065