Select text inside a link like Opera

Disable link dragging and select text.

< Feedback op Select text inside a link like Opera

Recensie: Goed - het script werkt zoals het hoort

§
Geplaatst: 14-04-2020
Bijgewerkt: 14-04-2020

Provide an indicator when the selection is provided by your script ?

I test your script (thanks very useful!) I notice it's sometime difficult to understand if the selection is provided by your script or not or if it's possible or not. Well sorry if i am not very clear...

I tested a small tweak on this -moz-user-select:

if (!document.contentType || !document.contentType.endsWith("/xml")) { document.addEventListener("DOMContentLoaded", function(){ GM_addStyle(".select-text-inside-a-link{ -moz-user-select: text!important; background: red!important; }"); }); }

Seems working, but maybe can be improved for some events i can't see now... I think a way to change the cursor (by a customized) which give infos (before we try to select text in link or move the link)

  • when selection is ready or not
  • when moving link is possible and good
eightMaker
§
Geplaatst: 30-04-2020

What is the use-case of this feature? Some problems:

  1. It's not clear which selection is "provided by the script". For example, you can create a selection manually and extend the selection with this script.
  2. the .select-text-inside-a-link is added to an element instead of the selection.
§
Geplaatst: 30-04-2020
Bijgewerkt: 30-04-2020

Yes, like i said it is not clear! ;-) The idea was to know when your script work: i know it work when i can select text inside a link. But sometime , i can select text without it. And i wanted know when i can move a link or select the text only: Sometime i see the move cursor on the link and if i click to move it, it select the text.

But Let's go... It's just by curiosity... And i need just to remember to drag Horizontaly before to click... PS: I make a last test by adding too a Customized curor (a little red pin) to see if this info is useful: GM_addStyle(".select-text-inside-a-link{ -moz-user-select: text!important; background: greenyellow!important; cursor: url(http://www.softcom.com.ua/images/1/pin_red.png), auto !important; }");

Reactie plaatsen

Log in om antwoord te geven.