Select text inside a link like Opera

Disable link dragging and select text.

Stan na 22-12-2019. Zobacz najnowsza wersja.

Aby zainstalować ten skrypt, wymagana jest instalacje jednego z następujących rozszerzeń: Tampermonkey, Greasemonkey lub Violentmonkey.

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

Aby zainstalować ten skrypt, wymagana jest instalacje jednego z następujących rozszerzeń: Tampermonkey, Violentmonkey.

Aby zainstalować ten skrypt, wymagana będzie instalacja rozszerzenia Tampermonkey lub Userscripts.

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

Aby zainstalować ten skrypt, musisz zainstalować rozszerzenie menedżera skryptów użytkownika.

(Mam już menedżera skryptów użytkownika, pozwól mi to zainstalować!)

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.

Będziesz musiał zainstalować rozszerzenie menedżera stylów użytkownika, aby zainstalować ten styl.

Będziesz musiał zainstalować rozszerzenie menedżera stylów użytkownika, aby zainstalować ten styl.

Musisz zainstalować rozszerzenie menedżera stylów użytkownika, aby zainstalować ten styl.

(Mam już menedżera stylów użytkownika, pozwól mi to zainstalować!)

Autor
eight
Oceny
0 0 0
Wersja
5.0.4
Utworzono
11-05-2014
Zaktualizowano
22-12-2019
Rozmiar
4,87 KB
Licencja
MIT
Dotyczy
Wszystkie strony

Select text inside a link like Opera

Build Status

By installing this script, you can select text inside a link without dragging them around if the cursor was moved horizontally.

screenshot screenshot

Installation

Greasy Fork

Compatibility

This script supports Firefox and Chrome. However, things become tricky in Firefox.

In Firefox, we can't detect the movement of the cursor after the mousedown event, so we actually use the movement before the mouse click. If you move the cursor vertically to a link, stop, then drag the link horizontally, the script will detect the movement as vertical and it won't prevent the link from being dragged.

Changelog

  • 5.0.3 (Jun 6, 2019)

    • Fix: handle undraggable links.
  • 5.0.1 (Jan 22, 2019)

    • Fix: compatible with XML/XHTML pages.
  • 5.0.0 (Jan 20, 2019)

    • Rewrite.
    • Fix: don't collapse selection if the target is not a link.
  • 4.0.12 (Nov 18, 2014)

    • Enhance: Only prevent click if text is selected.
  • 4.0.11 (Nov 18, 2014)

    • Fix: Form button issue.
  • 4.0.10 (Nov 17, 2014)

    • Fix: DeviantArt issue. Use capture on "mousedown".
  • 4.0.9 (Nov 17, 2014)

    • Fix: Firefox clicking issue. (This might break some sites!)
  • 4.0.8 (Nov 17, 2014)

    • Fix: No effect in firefox's responsive design viewer.
  • 4.0.7 (Nov 17, 2014)

    • Support Chrome!
  • 4.0.6 (Nov 12, 2014)

    • Fix: Unable to click links after selecting.
  • 4.0.5 (Nov 11, 2014)

    • Fix: Unable to drag image.
  • 4.0.4 (Oct 30, 2014)

    • Fix: Unable to drag selected text.
  • 4.0.3 (Oct 19, 2014)

    • Cleanup some old code.
    • Add a new method to detect dragging direction.
  • 4.0.2 (Oct 19, 2014)

    • Fix: Prevent click event when selecting.
  • 4.0.1

    • Fix: Position calculating bug.
  • 4.0 (Sep 29, 2014)

    • Now the script will only work if you drag horizontally.
  • 3.0.1 (Aug 17, 2014)

    • Change the timing of uninit. Will uninit each time mouseup.
  • 3.0 (Aug 17, 2014)

    • Rewrite with my coding style.