Bug 1966483 - add long-press shortcut for link preview r=txia,firefox-ai-ml-reviewers

Detect long press if enabled and show preview after configurable 1s delay if not drag or mouseup.

Differential Revision: https://phabricator.services.mozilla.com/D249480
This commit is contained in:
Ed Lee
2025-05-17 22:44:26 +00:00
committed by elee@mozilla.com
parent 717e5f6c4e
commit 6e871f0a57
4 changed files with 101 additions and 1 deletions

View File

@@ -2146,6 +2146,7 @@ pref("browser.ml.linkPreview.blockListEnabled", true);
pref("browser.ml.linkPreview.collapsed", false);
pref("browser.ml.linkPreview.enabled", false);
pref("browser.ml.linkPreview.longPress", true);
pref("browser.ml.linkPreview.longPressMs", 1000);
pref("browser.ml.linkPreview.noKeyPointsRegions", "AD,AT,BE,BG,CH,CY,CZ,DE,DK,EE,ES,FI,FR,GR,HR,HU,IE,IS,IT,LI,LT,LU,LV,MT,NL,NO,PL,PT,RO,SE,SI,SK");
pref("browser.ml.linkPreview.optin", false);
pref("browser.ml.linkPreview.outputSentences", 3);