Select text inside a link like Opera

Disable link dragging and select text.

< 腳本Select text inside a link like Opera的回應

提問/評論

§
發表於:2014-10-18

Doesn't work on some sites

Thanks for greatest script I've seen :)
It works, but not on all sites. For example try to select some positions here:
http://www.atctrade.ru/etp/trade/list.html
Or here:
http://etp.mse.ru/etp/trade/list.html
Would be great to fix this =)
P.S. Thanks again. It's wonderful.

eight作者
§
發表於:2014-10-19
編輯:2014-10-19

Do you mean that when selecting text in the table, it will trigger mouse click and change page?

These sites use javascript to change page, and those table contents are not links. You can try it by disabling Grease Monkey.

I think it's reasonable to disable mouse click event if user is selecting text, but it might break other script if they also use click event to handle selecting.

I'll fix it later.

Edit:

Fixed at version 4.0.2

§
發表於:2014-10-19

Awsome =) Thanks!

§
發表於:2014-10-30

Find one more.
If installed "Google search link fix" addon then selecting link in google enables transfer to link. Not sure if this bug in script or in addon

eight作者
§
發表於:2014-10-31

This add-on prevent event bubbling, which means that all scripts depend on click event won't work, including Google's and mine. And that's how he stops Google from changing the link's url.

How about trying this one?

§
發表於:2014-11-17
編輯:2014-11-17

Unfortunately, it also fixes yandex.ru (I use it). Ok, thanks for the answer.
Found 1 regression when update from 4.0.5 to 4.0.8: script doesn't prevent click event on some sites, like this:
http://utender.ru/public/public-offers/lots/view/526643/
For example, try to select "№0014053"
Or from my first comment:
http://www.atctrade.ru/etp/trade/list.html
http://etp.mse.ru/etp/trade/list.html

woxxom管理員
§
發表於:2014-11-17
編輯:2014-11-17
For example, try to select "№0014053"

Same here in FF and Chrome - the block is toggled with 4.0.8.

eight作者
§
發表於:2014-11-17
編輯:2014-11-17

Fixed at 4.0.9.

@wOxxOm

Actually it's a browser issue (and not the script's bug). Browser will fire click event if mousedown and mouseup are both triggered in same element, even you have select some text.

Therefore, I prevent click event if mousedown and mouseup are not at the same position.

§
發表於:2014-11-17

Thanks again!

§
發表於:2016-08-26

Can you provide a list of links example where your script work and make the difference.
It's not easy to see to understand how it can be useful ...

Where i tested it , it's seems useful, like for this example:
http://utender.ru/public/public-offers/lots/view/526643/

發表回覆

登入以回復