Link Helper - Triple Click Text to Link

Convert text URLs to links on triple click

您需要先安裝使用者腳本管理器擴展,如 TampermonkeyGreasemonkeyViolentmonkey 之後才能安裝該腳本。

您需要先安裝使用者腳本管理器擴充功能,如 TampermonkeyViolentmonkey 後才能安裝該腳本。

您需要先安裝使用者腳本管理器擴充功能,如 TampermonkeyViolentmonkey 後才能安裝該腳本。

您需要先安裝使用者腳本管理器擴充功能,如 TampermonkeyUserscripts 後才能安裝該腳本。

你需要先安裝一款使用者腳本管理器擴展,比如 Tampermonkey,才能安裝此腳本

您需要先安裝使用者腳本管理器擴充功能後才能安裝該腳本。

(我已經安裝了使用者腳本管理器,讓我安裝!)

你需要先安裝一款使用者樣式管理器擴展,比如 Stylus,才能安裝此樣式

你需要先安裝一款使用者樣式管理器擴展,比如 Stylus,才能安裝此樣式

你需要先安裝一款使用者樣式管理器擴展,比如 Stylus,才能安裝此樣式

你需要先安裝一款使用者樣式管理器擴展後才能安裝此樣式

你需要先安裝一款使用者樣式管理器擴展後才能安裝此樣式

你需要先安裝一款使用者樣式管理器擴展後才能安裝此樣式

(我已經安裝了使用者樣式管理器,讓我安裝!)

作者
alex3236
今日安裝
0
安裝總數
8
評價
0 0 0
版本
1.1
建立日期
2025-04-04
更新日期
2025-04-04
尺寸
3.9 KB
授權條款
MIT
腳本執行於
所有網站

Link Helper - Triple Click Text to Link

Have you ever encountered a situation where you're browsing a webpage and spot a plain text URL that isn't clickable?

Like this:

https://example.org/

This script can help solve that problem. Simply triple-click rapidly on the plain text URL, and it will automatically convert into a clickable link.

Screenshot

Features

Smart Trigger

  • Activates with three consecutive clicks (within 1 second) at the same location
  • 10-pixel position tolerance detection

Accurate Recognition

  • Automatically detects URLs starting with http://, https://, or www.
  • Skips text already enclosed in <a> tags
  • Supports simultaneous conversion of multiple URL text segments

Safe Replacement

  • Non-destructive DOM manipulation
  • Preserves original text formatting
  • Automatically adds target="_blank" attribute

Instructions

  1. Locate the Text URL
    Find the plain text URL you want to convert (e.g., https://example.com)

  2. Triple-Click Quickly
    Quickly click three times in a row (left mouse button) on the text URL

  3. Automatic Conversion
    Once successful, the text will turn blue and become a clickable link

Configuration

You may modify the constants in the script to suit your needs.

const CLICK_TIMEOUT = 1000;
const CLICK_THRESHOLD = 10;
const URL_REGEX = /(https?:\/\/[^\s<]+|www\.[^\s<]+\.[^\s<]{2,})/gi;
const STYLE = "color: #66CCFF; background: #163E64";