Bartosz Dziewoński
eb497b00c7
permalinks: Only handle unmodified left clicks
...
Allow using Ctrl+click to open the link in a new tab, or Alt+click to
select the text, without annoying side effects.
Change-Id: I3ab4c1ec3d5fc6c69e7f44489bbe63c536a64b91
2024-07-02 10:38:42 +02:00
David Lynch
edb23dc849
Permalink copying: fix another reference to e.target
...
Bug: T368701
Change-Id: Iae20e4573dfc12ea9d4010390fe2acb135e1b1cd
2024-06-28 11:05:11 -05:00
David Lynch
cd39c267b5
Permalink copying: use currentTarget to avoid conflicts with userscripts
...
Bug: T368701
Change-Id: I70b1cbf8aaf917ed843f003eec7bbd61db39ecc7
2024-06-28 10:17:27 -05:00
Bartosz Dziewoński
9d73c46d99
Percent-decode the permalink when copying
...
Bug: T357021
Change-Id: Ic71c030e6796695de5ff88a940adb86d63996e7f
2024-05-28 18:22:30 +02:00
Ed Sanders
ca5157156a
ESLint: Autofix no-var rule
...
Leave rule off for now as manual fixes are required.
Also temporarily disable prefer-const rule as that
will also require some manual fixes.
Change-Id: I8c3478f26f51287acb943bd38c9c1020c06b9f39
2024-05-24 16:49:36 +01:00
Ed Sanders
a74c00ba8c
Prefer arrow functions for callbacks
...
This allows us to remove our `this` bindings.
Change-Id: Ie8c8c38d36af8a033b5181870c39f8981a57b939
2024-04-19 12:34:23 +01:00
David Lynch
01749e4970
Instrument when permalinks are copied
...
Bug: T359182
Change-Id: I3a7cfc0eaf6472804cc587cfa320bdc20b462492
2024-03-05 11:35:46 -06:00
Ed Sanders
3b9128bdff
Permalinks: Fix scroll restoration on mobile
...
Change-Id: Icc60f089764a31f352fc89982d832653b7f14e07
2023-10-05 14:13:55 +01:00
Ed Sanders
d4819367aa
Permalinks: Factor out copyLink clipboard functionality
...
Change-Id: I8092e8f831b67a32b652a5cb88808f6e463d9b4c
2023-10-05 11:04:01 +01:00
Ed Sanders
58cb277ced
Factor out permalink code into separate file
...
Change-Id: Ib56a0b9766529f517ae8c5f743f891b06f3cf690
2023-10-05 10:55:00 +01:00