Perplexity Code Block Copy (AFU IT)

Enhanced code blocks in Perplexity with better selection and copy features for inline code

θα χρειαστεί να εγκαταστήσετε μια επέκταση όπως το Tampermonkey, το Greasemonkey ή το Violentmonkey για να εγκαταστήσετε αυτόν τον κώδικα.

You will need to install an extension such as Tampermonkey to install this script.

θα χρειαστεί να εγκαταστήσετε μια επέκταση όπως το Tampermonkey ή το Violentmonkey για να εγκαταστήσετε αυτόν τον κώδικα.

θα χρειαστεί να εγκαταστήσετε μια επέκταση όπως το Tampermonkey ή το Userscripts για να εγκαταστήσετε αυτόν τον κώδικα.

You will need to install an extension such as Tampermonkey to install this script.

Θα χρειαστεί να εγκαταστήσετε μια επέκταση διαχείρισης κώδικα χρήστη για να εγκαταστήσετε αυτόν τον κώδικα.

(Έχω ήδη έναν διαχειριστή κώδικα χρήστη, επιτρέψτε μου να τον εγκαταστήσω!)

You will need to install an extension such as Stylus to install this style.

You will need to install an extension such as Stylus to install this style.

You will need to install an extension such as Stylus to install this style.

You will need to install a user style manager extension to install this style.

You will need to install a user style manager extension to install this style.

You will need to install a user style manager extension to install this style.

(Έχω ήδη έναν διαχειριστή στυλ χρήστη, επιτρέψτε μου να τον εγκαταστήσω!)

Δημιουργός
afu-it
Ημερήσιες εγκαταστάσεις
0
Σύνολο εγκαταστάσεων
9
Βαθμολογίες
0 0 0
Έκδοση
1.0
Δημιουργήθηκε την
08/05/2025
Ενημερώθηκε την
08/05/2025
Μέγεθος
10 KB
Άδεια
MIT
Εφαρμόζεται σε

Description
This userscript make code blocks in Perplexity AI by adding one-click copy functionality and custom styling. It makes inline code stand out with a light blue background while maintaining the default styling for multi-line code blocks.

Easy to understand
Just select the code, and it will auto copied the code
But what if its a long code? Just double click it, it will copied all the code!

Features
- Inline code highlighting: Single-line code within paragraphs gets a distinctive #20b8cb background with black text
- Easy copying: Click inline code to copy it, or select specific text to copy just that portion
- Double-click to copy all: Double-click any code block to copy its entire content
- Visual feedback: A small "Copied!" tooltip appears next to your cursor when text is copied
- Smart styling: Only applies styling after answers are fully generated

Installation Tutorial

1. Install Tampermonkey:
- Visit the [Chrome Web Store](https://chrome.google.com/webstore/detail/tampermonkey/dhdgffkkebhmkfjojejmpbldmpobfkfo) (for Chrome) or [Firefox Add-ons](https://addons.mozilla.org/en-US/firefox/addon/tampermonkey/) (for Firefox)
- Click "Add to Chrome/Firefox" to install the extension

2. Create a new script:
- Click on the Tampermonkey icon in your browser toolbar
- Select "Create a new script"
- Delete any default code that appears

3. Add the script:
- Copy and paste the entire userscript code into the editor
- Click File > Save or press Ctrl+S

4. Use the enhanced code blocks:
- Visit Perplexity AI (refresh if you're already there)
- Inline code will now have a light blue background
- Click on inline code to copy it
- Select text within any code block to copy just that selection
- Double-click any code block to copy its entire content

Usage Tips
- For inline code like `console.log()`, just click once to copy
- For multi-line code blocks, select specific text to copy portions
- Double-click anywhere in a code block to copy the entire block
- The tooltip appears right next to your cursor for immediate feedback