Bitcoin Forum
September 17, 2026, 11:53:08 PM *
News: Latest Bitcoin Core release: 31.1 [Torrent]
 
   Home   Help Search Login Register More  
Pages: [1]
  Print  
Author Topic: [Userscript] Automatically Format Pasted URLs as [url=...]Text[/url]  (Read 373 times)
PX-Z (OP)
Legendary
*
Offline

Activity: 2310
Merit: 1393



View Profile WWW
September 05, 2026, 09:26:09 PM
Last edit: September 14, 2026, 11:19:07 AM by PX-Z
Merited by bitmover (3), notocactus (1), dkbit98 (1), Peanutswar (1), Crypto Library (1), DYING_S0UL (1), *Ace* (1)
 #1

Idk, if someone made this already here but i made this userscript just few days (or a week?) ago as i havent seen such on Bitcointalk.org Userscripts/ Add-ons / SMF patches. This script automatically converts copied urls to bbcode url tags instead of clicking the url tag and edit it manually.

Features

- Automatically formats copy/pasted URL to bbcode URL tag.
- Works on highlighted/selected text too, paste to the highlighted/selected text and will have url tag format
- To enable or disable. Press Ctrl+Shift+U or click "Enable/Disable" toggle.



Installation
- Install Tampermonkey (or any userscript extension) on desktop (most browsers) and on mobile (Edge or any browser that supports extensions).
- Go Tampermonkey and Create new script..
- Copy and paste the userscript github source or install from Greasyfork
- Then save

Let me know your thoughts. Smiley



Changelog:
Code:
v1.3 - Added support for highlighted/selected text as the URL label
v1.2 - Added shortcut key and Enable/Disable link to toggle the script
v1.1 - Removed input fields and limited the script to textareas
v1.0 - Initial release

...Vega.bet...██
██
██
██
██
██
██
██
██
██
██
██
██

...100 FS + 750BONUS..MAX.WIN.$5,000...

███...FAST PAYOUTS  |  NO KYC  |  10% LOSSBACK...███
██
██
██
██
██
██
██
██
██
██
██
██
██
....Play Now....
un_rank
Legendary
*
Offline

Activity: 1582
Merit: 1115



View Profile WWW
September 05, 2026, 09:35:56 PM
 #2

Does it have a turn off feature if the user just wants to post the url without a hyperlink?

When I'm on mobile I struggle to properly place the cursor properly to then paste the link into the code so this can be useful, but I don't use url tags nearly often enough to need a userscript for it. Those that do may require a turn off feature or a pop up that allows them paste plain link or the one embedded in the tags .

- Jay -


 BetBolt.com  
███████████████████████
███████████████████████
███████████████████████
██████████████████████
█████████████████████
██████████████████████
██████████████████████
███████████████████
██████████████████████
███████████████████████
███████████████████████
███████████████████████
▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀
🗲
███    ███████████████████████████████████████

CRYPTO'S MOST REWARDING CASINO

███████████████████████████████████████    ███
██████▄██████▄▄
███▄██████████████▄▄
▄███████████████████
█████████████████████
▀███████
████████████████▄
█████████████████████████
███▀███████████████████▀
█████████████████████▀▀
██████▀███████████▀▀
███████████████▀▀
█████████▀█▀▀
    PLAY NOW   



███▄▄▄▄███
████████████
███████████▀
████████▄
█████████▄
█████▀█████▄
▀██████▀█████
██████████▀██▀
PX-Z (OP)
Legendary
*
Offline

Activity: 2310
Merit: 1393



View Profile WWW
September 05, 2026, 09:48:47 PM
 #3

Does it have a turn off feature if the user just wants to post the url without a hyperlink?
You mean without the url tag, like just naked url? Now, that's a problem, i might probably change the "change_text" to same naked url instead so even if its posted the url still looks like the same.

...Vega.bet...██
██
██
██
██
██
██
██
██
██
██
██
██

...100 FS + 750BONUS..MAX.WIN.$5,000...

███...FAST PAYOUTS  |  NO KYC  |  10% LOSSBACK...███
██
██
██
██
██
██
██
██
██
██
██
██
██
....Play Now....
dkbit98
Legendary
*
Offline

Activity: 3094
Merit: 8860



View Profile WWW
September 08, 2026, 08:38:38 PM
 #4

Interesting work with this useful userscript, but I think it needs to a bit more work to make it better.

Does it have a turn off feature if the user just wants to post the url without a hyperlink?
You can simply disable userscript if you want to copy the link without a hyoerlink.
I guess it would be a good idea to enable some key press combination shortcut that would disable it temporary.


▄▄██████▄░░░▄██████▄▄
██▀▀░░░░░░░░░░░░░▀▀██
▄▄██████▄▄██████▄▄
▄████▀▀▀▀█████▀▀▀▀████▄
▄███░░░▄▄░░░░░░▄▄░░░███▄
▄▄▄███░░░░██░░░░░░░██░░░░███▄▄▄
████████░░░░██░░░░░░░██░░░░████████
██████████░░░▀▀░░░░░░▀▀░░░██████████
████▀▀██████▄▄▄▄█████▄▄▄▄██████▀▀████
▀███▄░░▀▀███████████████████▀▀░░▄███▀
▀████▄▄░░░░▀▀▀▀▀▀▀▀▀▀▀▀▀░░░░▄▄████▀
▀███████▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄███████▀
▀▀█████████████████████▀▀
  
OrangeFren
  
██
██
██
██
██
██
██
██
██
██
██
  
▄▄█████▄▄
▄████▀▀▀████▄
███▀░░░░░░░▀███
███▀░░░▄█░░░░▀███
███░░░░░░░░░░███
███▄░░░▄█▄░░░▄███
███▄░░░░░░░▄███
▀████▄▄▄████▀
█████████
▐█████████▌
██████████
▐████▌▐████▌
▀▀▀█░░░█▀▀▀
 
*Ace*
Hero Member
*****
Offline

Activity: 546
Merit: 1069



View Profile
September 09, 2026, 10:06:51 PM
 #5

A really interesting and useful tool. I sometimes have real trouble inserting the tag correctly for text links; this tool would solve my problem, but then, as others have said, what if I don’t want it to be active?
Could you add a button next to the emoji icons to show whether the script is on or off? That might be useful, wouldn’t it?
It’s just an idea of mine – perhaps you could put it wherever you think is best.
In the meantime, I’ll install it and wait for further updates. Thanks, PX-Z

PX-Z (OP)
Legendary
*
Offline

Activity: 2310
Merit: 1393



View Profile WWW
September 10, 2026, 03:34:23 PM
Merited by *Ace* (1)
 #6

Does it have a turn off feature if the user just wants to post the url without a hyperlink?
I guess it would be a good idea to enable some key press combination shortcut that would disable it temporary.
Could you add a button next to the emoji icons to show whether the script is on or off? That might be useful, wouldn’t it?
Thanks for the thoughts. It really does make sense. So i have updated the script and added a link/button or shortcut key CTR+SHIFT+U to disable/enable the script. There is a note above the "Subject" to identify the if its enabled or disabled. Smiley


...Vega.bet...██
██
██
██
██
██
██
██
██
██
██
██
██

...100 FS + 750BONUS..MAX.WIN.$5,000...

███...FAST PAYOUTS  |  NO KYC  |  10% LOSSBACK...███
██
██
██
██
██
██
██
██
██
██
██
██
██
....Play Now....
bitmover
Legendary
*
Online Online

Activity: 3164
Merit: 7761


Trêvoid █ No KYC-AML Crypto Swaps


View Profile WWW
September 10, 2026, 07:20:22 PM
 #7

Good idea PX-Z.
This is indeed a problem, to paste links in the forum

Does it have a turn off feature if the user just wants to post the url without a hyperlink?
You mean without the url tag, like just naked url? Now, that's a problem, i might probably change the "change_text" to same naked url instead so even if its posted the url still looks like the same.

I was going to suggest using CTRL+SHIFT+V or CTRL+ALT+V for the url with the bbcode. Or even a new paste button in the forum page.

But you already solved slightly different

▄▄████████████████████▄▄
▄███████▀▀██████▀▀███████▄
████████████████████████
████████▄▄██████▄▄██████

████████████████████████
██▄▄█████████████▄▄██████
██▀▀██████████████████▄▄██
██████▀▀██████████████▀▀██
██████████████████████████
██████▀▀██████▀▀████████
████████████████████████
▀███████▄▄██████▄▄███████▀
▀▀████████████████████▀▀
 
 DΞX.fo 
▄▄██████
█████████
██████████
█████████
██████████
█████████
▀▀██████

▄███████
▄██████████
████████████
█████████████
█████████████
|
▄▄█
▄████▀
▄███▀
▄██▀▄██
█████▀▀
███████
████████
▀██▄████
▄████▄▄
▄█████▀███
▄█████▀████
█████▀███████
▀██▀█████████
|  BTC     XMR  
  DAI     LTC  
   Fees  0.8%    
PX-Z (OP)
Legendary
*
Offline

Activity: 2310
Merit: 1393



View Profile WWW
September 10, 2026, 07:43:24 PM
 #8

This is indeed a problem, to paste links in the forum
I really have a bad experience of pasting links to adding url tag and adding text on it that's why i came up such an idea and have a time thinking to code lmao.

I was going to suggest using CTRL+SHIFT+V or CTRL+ALT+V for the url with the bbcode. Or even a new paste button in the forum page.

But you already solved slightly different
I actually may consider adding a new button especially for mobile phone users as i didnt try it there yet, only on desktop. If someone can do, i appreciate it. I might try it later today though.

...Vega.bet...██
██
██
██
██
██
██
██
██
██
██
██
██

...100 FS + 750BONUS..MAX.WIN.$5,000...

███...FAST PAYOUTS  |  NO KYC  |  10% LOSSBACK...███
██
██
██
██
██
██
██
██
██
██
██
██
██
....Play Now....
bitmover
Legendary
*
Online Online

Activity: 3164
Merit: 7761


Trêvoid █ No KYC-AML Crypto Swaps


View Profile WWW
September 10, 2026, 07:48:54 PM
Merited by PX-Z (1)
 #9

I actually may consider adding a new button especially for mobile phone users as i didnt try it there yet, only on desktop. If someone can do, i appreciate it. I might try it later today though.

You can check the code of my extension
I added several buttons

Code: https://github.com/bitmover-studio/bitcoindata-extension

▄▄████████████████████▄▄
▄███████▀▀██████▀▀███████▄
████████████████████████
████████▄▄██████▄▄██████

████████████████████████
██▄▄█████████████▄▄██████
██▀▀██████████████████▄▄██
██████▀▀██████████████▀▀██
██████████████████████████
██████▀▀██████▀▀████████
████████████████████████
▀███████▄▄██████▄▄███████▀
▀▀████████████████████▀▀
 
 DΞX.fo 
▄▄██████
█████████
██████████
█████████
██████████
█████████
▀▀██████

▄███████
▄██████████
████████████
█████████████
█████████████
|
▄▄█
▄████▀
▄███▀
▄██▀▄██
█████▀▀
███████
████████
▀██▄████
▄████▄▄
▄█████▀███
▄█████▀████
█████▀███████
▀██▀█████████
|  BTC     XMR  
  DAI     LTC  
   Fees  0.8%    
PX-Z (OP)
Legendary
*
Offline

Activity: 2310
Merit: 1393



View Profile WWW
September 10, 2026, 11:56:27 PM
 #10

I actually may consider adding a new button especially for mobile phone users as i didnt try it there yet, only on desktop. If someone can do, i appreciate it. I might try it later today though.

You can check the code of my extension
I added several buttons

Code: https://github.com/bitmover-studio/bitcoindata-extension

Cool, thanks. I'll check on this.

Usually, i struggle on how to make/generate an icon or the design of it when it comes to this. Well, anyway, i will just look for some reference.

...Vega.bet...██
██
██
██
██
██
██
██
██
██
██
██
██

...100 FS + 750BONUS..MAX.WIN.$5,000...

███...FAST PAYOUTS  |  NO KYC  |  10% LOSSBACK...███
██
██
██
██
██
██
██
██
██
██
██
██
██
....Play Now....
DYING_S0UL
Legendary
*
Offline

Activity: 1162
Merit: 1235


The Alliance Of Bitcointalk Translator - AOBT


View Profile WWW
September 11, 2026, 01:16:59 AM
 #11

Firefox Mobile + VioletMonkey + URL userscript = And so it works as intended

Good Job PX-Z.

I have a feature request (not sure whether its already requested, as I have not read other comments, as I'm on my mobile.device). Can you make it so that when something is selected (like a word, or a sentence, or anything), I can directly paste the link, and it gets embedded with that selected portion. So that I don't need to manually edit the "change_text" part!

I'm not sure if you understand my idea (should have used better wordings I guess).

P.S: I tried to do it, but it seems it doesn't exist (yet). Wink

▄▄███████████████████▄▄
▄███████████████████████▄
████████████████████████
█████████████████████████
████████████████████████
████████████▀██████▀████
████████████████████████
█████████▄▄▄▄███████████
██████████▄▄▄████████████
████████████████████████
████████████████▀▀███████
▀███████████████████████▀
▀▀███████████████████▀▀
 
 EARNBET 
██
██
██
██
██
██
██
██
██
██
██
██
██
███████▄▄███████████
████▄██████████████████
██▀▀███████████████▀▀███
▄████████████████████████
▄▄████████▀▀▀▀▀████████▄▄██
███████████████████████████
█████████▌██▀████████████
███████████████████████████
▀▀███████▄▄▄▄▄█████████▀▀██
▀█████████████████████▀██
██▄▄███████████████▄▄███
████▀██████████████████
███████▀▀███████████
██
██
██
██
██
██
██
██
██
██
██
██
██


▄▄▄
▄▄▄███████▐███▌███████▄▄▄
█████████████████████████
▀████▄▄▄███████▄▄▄████▀
█████████████████████
▐███████████████████▌
███████████████████
███████████████████
▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀

 King of The Castle 
 $200,000 in prizes
██
██
██
██
██
██
██
██
██
██
██
██
██

 62.5% 

 
RAKEBACK
BONUS
bitmover
Legendary
*
Online Online

Activity: 3164
Merit: 7761


Trêvoid █ No KYC-AML Crypto Swaps


View Profile WWW
September 11, 2026, 01:22:45 AM
 #12

Firefox Mobile + VioletMonkey + URL userscript = And so it works as intended

Good Job PX-Z.

I have a feature request (not sure whether its already requested, as I have not read other comments, as I'm on my mobile.device). Can you make it so that when something is selected (like a word, or a sentence, or anything), I can directly paste the link, and it gets embedded with that selected portion. So that I don't need to manually edit the "change_text" part!

I'm not sure if you understand my idea (should have used better wordings I guess).

P.S: I tried to do it, but it seems it doesn't exist (yet). Wink

There are some websites which you copy a content and when you pasted you the  "content ... read more in URL"

Maybe something like this would fit well

Maybe scrap the website title from where you copied the contenttto fill the "change_text"

▄▄████████████████████▄▄
▄███████▀▀██████▀▀███████▄
████████████████████████
████████▄▄██████▄▄██████

████████████████████████
██▄▄█████████████▄▄██████
██▀▀██████████████████▄▄██
██████▀▀██████████████▀▀██
██████████████████████████
██████▀▀██████▀▀████████
████████████████████████
▀███████▄▄██████▄▄███████▀
▀▀████████████████████▀▀
 
 DΞX.fo 
▄▄██████
█████████
██████████
█████████
██████████
█████████
▀▀██████

▄███████
▄██████████
████████████
█████████████
█████████████
|
▄▄█
▄████▀
▄███▀
▄██▀▄██
█████▀▀
███████
████████
▀██▄████
▄████▄▄
▄█████▀███
▄█████▀████
█████▀███████
▀██▀█████████
|  BTC     XMR  
  DAI     LTC  
   Fees  0.8%    
DYING_S0UL
Legendary
*
Offline

Activity: 1162
Merit: 1235


The Alliance Of Bitcointalk Translator - AOBT


View Profile WWW
September 11, 2026, 02:14:55 AM
 #13

....snip....

There are some websites which you copy a content and when you pasted you the  "content ... read more in URL"

Maybe something like this would fit well

Maybe scrap the website title from where you copied the contenttto fill the "change_text"

Yeah, the free image hosting sites that tends to link their site with the img tag. But this is not what I originally had in mind, though this too (feature) is somewhat needed if OP wants to further improve his tool.

What I'm requesting is, select and paste - the selected part gets embedded with the link.

like this below... Smiley


▄▄███████████████████▄▄
▄███████████████████████▄
████████████████████████
█████████████████████████
████████████████████████
████████████▀██████▀████
████████████████████████
█████████▄▄▄▄███████████
██████████▄▄▄████████████
████████████████████████
████████████████▀▀███████
▀███████████████████████▀
▀▀███████████████████▀▀
 
 EARNBET 
██
██
██
██
██
██
██
██
██
██
██
██
██
███████▄▄███████████
████▄██████████████████
██▀▀███████████████▀▀███
▄████████████████████████
▄▄████████▀▀▀▀▀████████▄▄██
███████████████████████████
█████████▌██▀████████████
███████████████████████████
▀▀███████▄▄▄▄▄█████████▀▀██
▀█████████████████████▀██
██▄▄███████████████▄▄███
████▀██████████████████
███████▀▀███████████
██
██
██
██
██
██
██
██
██
██
██
██
██


▄▄▄
▄▄▄███████▐███▌███████▄▄▄
█████████████████████████
▀████▄▄▄███████▄▄▄████▀
█████████████████████
▐███████████████████▌
███████████████████
███████████████████
▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀

 King of The Castle 
 $200,000 in prizes
██
██
██
██
██
██
██
██
██
██
██
██
██

 62.5% 

 
RAKEBACK
BONUS
PX-Z (OP)
Legendary
*
Offline

Activity: 2310
Merit: 1393



View Profile WWW
September 11, 2026, 02:45:59 AM
Merited by DYING_S0UL (1)
 #14

Firefox Mobile + VioletMonkey + URL userscript = And so it works as intended
That's great to hear Smiley

I have a feature request (not sure whether its already requested, as I have not read other comments, as I'm on my mobile.device). Can you make it so that when something is selected (like a word, or a sentence, or anything), I can directly paste the link, and it gets embedded with that selected portion. So that I don't need to manually edit the "change_text" part!

I'm not sure if you understand my idea (should have used better wordings I guess).
I have just added this, that's actually a very nice feature.

Here's the sample of how it works





Maybe scrap the website title from where you copied the contenttto fill the "change_text"
I have thought of this as well, i even tried it, but there are lots of issues, one is CORS problem, some sites don't work well. Also, it takes time, like several seconds, which is not appropriate how fast copy and paste is and knowing how patience work for some of most, so i abandoned the idea lol

...Vega.bet...██
██
██
██
██
██
██
██
██
██
██
██
██

...100 FS + 750BONUS..MAX.WIN.$5,000...

███...FAST PAYOUTS  |  NO KYC  |  10% LOSSBACK...███
██
██
██
██
██
██
██
██
██
██
██
██
██
....Play Now....
xenomorfo
Sr. Member
****
Offline

Activity: 980
Merit: 417



View Profile
September 11, 2026, 03:22:00 PM
 #15

Idk, if someone made this already here but i made this userscript just few days (or a week?) ago as i havent seen such on Bitcointalk.org Userscripts/ Add-ons / SMF patches. This script automatically converts copied urls to bbcode url tags instead of clicking the url tag and edit it manually.


very nice and useful i must say, sometimes i tried to copy and only caused damage as a result
This makes it really easy, thank you so much for the work you've done for the whole community
very much appreciated i think not only by me but by everyone.

osasshem
Full Member
***
Offline

Activity: 1212
Merit: 137


Creating a Safer Crypto Ecosystem


View Profile
September 11, 2026, 03:34:41 PM
 #16

This is a very useful tool for posting links in the forum, it will be more resourceful when using smart phones while accessing the forum, it will make everything related to editing links faster and easier to do, cause phones have the challenge of copying things in the forum.

Does it have a turn off feature if the user just wants to post the url without a hyperlink?

It has a toggle for switching it on/off by the post made from OP.

PX-Z (OP)
Legendary
*
Offline

Activity: 2310
Merit: 1393



View Profile WWW
September 11, 2026, 05:37:47 PM
 #17

Does it have a turn off feature if the user just wants to post the url without a hyperlink?

It has a toggle for switching it on/off by the post made from OP.
There is no need to quote or respond to his post like that since he was one of the people who originally suggested the feature.

Anyway, i appreciate the kind words. Also, to make the installation process easier, i have added the Greasyfork installation link on the OP.

...Vega.bet...██
██
██
██
██
██
██
██
██
██
██
██
██

...100 FS + 750BONUS..MAX.WIN.$5,000...

███...FAST PAYOUTS  |  NO KYC  |  10% LOSSBACK...███
██
██
██
██
██
██
██
██
██
██
██
██
██
....Play Now....
Crypto Library
Legendary
*
Offline

Activity: 1708
Merit: 1220


Leading Crypto Sports Betting & Casino Platform


View Profile WWW
September 13, 2026, 06:15:12 PM
Merited by PX-Z (1)
 #18

I was going to suggest using CTRL+SHIFT+V or CTRL+ALT+V for the url with the bbcode. Or even a new paste button in the forum page.

But you already solved slightly different
I would also going to suggest this in this case, because sometimes I had to face problems due to direct CTRL+V, many times, when I wanted to give the direct links, I had to remove BBCode Tags like ... again manually.
So I think this CTRL+SHIFT+V option is better than Url formatter on/off button.

Anyway, what else can I suggest, since now the artificial intelligence era  Roll Eyes  so I customized the PX-Z script through chatgpt. Hope this will be helpful.

Code:
// ==UserScript==
// @name         Bitcointalk Paste URL Formatter
// @namespace    https://bitcointalk.org/
// @version      1.4
// @description  Formats pasted URLs as [url=URL]change_text[/url] BBCode using Ctrl+Shift+V. Works with highlighted/selected text. Press Ctrl+Shift+U to enable or disable.
// @match        https://bitcointalk.org/index.php?action=post*
// @grant        none
// @author       PX-Z
// @license      MIT
// ==/UserScript==

(function () {
    'use strict';

    function addStyles() {
        const style = document.createElement('style');

        style.textContent = `
            #url_formatter_note_text {
                padding: 3px 15px;
                border: 1px solid #e2cf6b;
                background: #fffbe4;
            }

            #url_formatter_toggle {
                margin-left: 8px;
            }
        `;

        document.head.appendChild(style);
    }

    let enabled = true;

    // Used to detect Ctrl+Shift+V before the paste event
    let formatterPaste = false;

    // Update the note text
    function updateNote() {
        const noteText = document.querySelector('#url_formatter_note_text');

        if (!noteText) {
            return;
        }

        noteText.innerHTML = enabled
            ? 'Note: URL Formatter is ON. Press Ctrl+Shift+V to format URL. Or click <a href="#" id="url_formatter_toggle">Disable</a>'
            : 'Note: URL Formatter is OFF. Press Ctrl+Shift+U to enable. Or click <a href="#" id="url_formatter_toggle">Enable</a>';

        const toggle = document.querySelector('#url_formatter_toggle');

        if (toggle) {
            toggle.addEventListener('click', function (e) {
                e.preventDefault();

                enabled = !enabled;

                updateNote();
            });
        }
    }

    // Add note after #lock_warning
    function addNote() {
        const lockWarning = document.querySelector('#lock_warning');

        if (!lockWarning) {
            return;
        }

        // Prevent duplicate note
        if (document.querySelector('#url_formatter_note')) {
            return;
        }

        const noteRow = document.createElement('tr');

        noteRow.id = 'url_formatter_note';

        noteRow.innerHTML = `
            <td></td>
            <td align="left">
                <span id="url_formatter_note_text"></span>
            </td>
        `;

        lockWarning.insertAdjacentElement('afterend', noteRow);

        updateNote();
    }

    // Keyboard shortcuts
    document.addEventListener('keydown', function (e) {

        // Ctrl + Shift + U = Enable / Disable Formatter
        if (
            e.ctrlKey &&
            e.shiftKey &&
            e.key.toLowerCase() === 'u'
        ) {
            e.preventDefault();

            enabled = !enabled;

            updateNote();

            return;
        }

        // Ctrl + Shift + V = Special URL Formatter Paste
        if (
            e.ctrlKey &&
            e.shiftKey &&
            e.key.toLowerCase() === 'v'
        ) {
            formatterPaste = true;
        }
    });

    // Reset formatterPaste if Ctrl+Shift+V is not followed by paste
    document.addEventListener('keyup', function (e) {
        if (e.key.toLowerCase() === 'v') {
            setTimeout(function () {
                formatterPaste = false;
            }, 100);
        }
    });

    // Handle paste
    document.addEventListener('paste', function (e) {

        // Only process Ctrl + Shift + V
        if (!formatterPaste) {
            return;
        }

        // Reset immediately
        formatterPaste = false;

        // Do nothing when disabled
        if (!enabled) {
            return;
        }

        const target = e.target;

        // Only handle textareas
        if (!(target instanceof HTMLTextAreaElement)) {
            return;
        }

        const text = e.clipboardData.getData('text/plain').trim();

        // Only process a single HTTP/HTTPS URL
        if (!/^https?:\/\/\S+$/i.test(text)) {
            return;
        }

        // Get selected text
        const start = target.selectionStart;
        const end = target.selectionEnd;
        const selectedText = target.value.substring(start, end);

        // Stop normal paste
        e.preventDefault();

        let bbcode;

        if (start !== end) {
            // Use selected text as anchor text
            bbcode = `[url=${text}]${selectedText}[/url]`;
        } else {
            // No selected text
            bbcode = `[url=${text}]change_text[/url]`;
        }

        // Insert BBCode
        target.setRangeText(
            bbcode,
            start,
            end,
            'end'
        );

        // Notify site's JavaScript that the textarea changed
        target.dispatchEvent(new Event('input', {
            bubbles: true
        }));
    });

    // MutationObserver
    const observer = new MutationObserver(function () {
        addNote();
    });

    observer.observe(document.body, {
        childList: true,
        subtree: true
    });

    // Initial check
    addNote();
    addStyles();

})();

On my side it is perfectly work for me but if anything need to change PX-Z can add it up  Wink

Anyway, Thanks to PX-Z, it's really useful tool

..Stake.com..   ▄████████████████████████████████████▄
   ██ ▄▄▄▄▄▄▄▄▄▄            ▄▄▄▄▄▄▄▄▄▄ ██  ▄████▄
   ██ ▀▀▀▀▀▀▀▀▀▀ ██████████ ▀▀▀▀▀▀▀▀▀▀ ██  ██████
   ██ ██████████ ██      ██ ██████████ ██   ▀██▀
   ██ ██      ██ ██████  ██ ██      ██ ██    ██
   ██ ██████  ██ █████  ███ ██████  ██ ████▄ ██
   ██ █████  ███ ████  ████ █████  ███ ████████
   ██ ████  ████ ██████████ ████  ████ ████▀
   ██ ██████████ ▄▄▄▄▄▄▄▄▄▄ ██████████ ██
   ██            ▀▀▀▀▀▀▀▀▀▀            ██ 
   ▀█████████▀ ▄████████████▄ ▀█████████▀
  ▄▄▄▄▄▄▄▄▄▄▄▄███  ██  ██  ███▄▄▄▄▄▄▄▄▄▄▄▄
 ██████████████████████████████████████████
▄▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▄
█  ▄▀▄             █▀▀█▀▄▄
█  █▀█             █  ▐  ▐▌
█       ▄██▄       █  ▌  █
█     ▄██████▄     █  ▌ ▐▌
█    ██████████    █ ▐  █
█   ▐██████████▌   █ ▐ ▐▌
█    ▀▀██████▀▀    █ ▌ █
█     ▄▄▄██▄▄▄     █ ▌▐▌
█                  █▐ █
█                  █▐▐▌
█                  █▐█
▀▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▀█
▄▄█████████▄▄
▄██▀▀▀▀█████▀▀▀▀██▄
▄█▀       ▐█▌       ▀█▄
██         ▐█▌         ██
████▄     ▄█████▄     ▄████
████████▄███████████▄████████
███▀    █████████████    ▀███
██       ███████████       ██
▀█▄       █████████       ▄█▀
▀█▄    ▄██▀▀▀▀▀▀▀██▄  ▄▄▄█▀
▀███████         ███████▀
▀█████▄       ▄█████▀
▀▀▀███▄▄▄███▀▀▀
..PLAY NOW..
PX-Z (OP)
Legendary
*
Offline

Activity: 2310
Merit: 1393



View Profile WWW
September 13, 2026, 11:58:15 PM
 #19

I would also going to suggest this in this case, because sometimes I had to face problems due to direct CTRL+V, many times, when I wanted to give the direct links, I had to remove BBCode Tags like ... again manually.
So I think this CTRL+SHIFT+V option is better than Url formatter on/off button.

Anyway, what else can I suggest, since now the artificial intelligence era  Roll Eyes  so I customized the PX-Z script through chatgpt. Hope this will be helpful.
Yes, this actually good. I haven't check it or update the script on Tampermonkey. I just read the updated codes. My only thought of using this approach is you might forget you are using such script and doesn't know the formatter is enabled. So might not use the shortcut key later on.
That's why i have put a note that the formatter is "enabled or disabled" with the use of ctrl+shift+u and the button.

Also, the cons is when using mobile phones since you can't use ctrl+shift+v to paste there. That's the current script has on and off button, and its for mobile mode users.

...Vega.bet...██
██
██
██
██
██
██
██
██
██
██
██
██

...100 FS + 750BONUS..MAX.WIN.$5,000...

███...FAST PAYOUTS  |  NO KYC  |  10% LOSSBACK...███
██
██
██
██
██
██
██
██
██
██
██
██
██
....Play Now....
Pages: [1]
  Print  
 
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.19 | SMF © 2006-2009, Simple Machines Valid XHTML 1.0! Valid CSS!