From 01f611d1898f046de2f367e8fe0ec6692ca7e445 Mon Sep 17 00:00:00 2001 From: toasted-nutbread Date: Sun, 10 Feb 2019 20:44:16 -0500 Subject: Add support for touch input --- ext/bg/js/options.js | 1 + ext/bg/js/settings.js | 2 ++ ext/bg/settings.html | 4 ++++ 3 files changed, 7 insertions(+) (limited to 'ext/bg') diff --git a/ext/bg/js/options.js b/ext/bg/js/options.js index 373a1a6b..f5f0bca7 100644 --- a/ext/bg/js/options.js +++ b/ext/bg/js/options.js @@ -201,6 +201,7 @@ function optionsSetDefaults(options) { scanning: { middleMouse: true, + touchInputEnabled: true, selectText: true, alphanumeric: true, autoHideResults: false, diff --git a/ext/bg/js/settings.js b/ext/bg/js/settings.js index 7bc6a651..9da869c7 100644 --- a/ext/bg/js/settings.js +++ b/ext/bg/js/settings.js @@ -36,6 +36,7 @@ async function formRead() { optionsNew.general.popupOffset = parseInt($('#popup-offset').val(), 10); optionsNew.scanning.middleMouse = $('#middle-mouse-button-scan').prop('checked'); + optionsNew.scanning.touchInputEnabled = $('#touch-input-enabled').prop('checked'); optionsNew.scanning.selectText = $('#select-matched-text').prop('checked'); optionsNew.scanning.alphanumeric = $('#search-alphanumeric').prop('checked'); optionsNew.scanning.autoHideResults = $('#auto-hide-results').prop('checked'); @@ -166,6 +167,7 @@ async function onReady() { $('#popup-offset').val(options.general.popupOffset); $('#middle-mouse-button-scan').prop('checked', options.scanning.middleMouse); + $('#touch-input-enabled').prop('checked', options.scanning.touchInputEnabled); $('#select-matched-text').prop('checked', options.scanning.selectText); $('#search-alphanumeric').prop('checked', options.scanning.alphanumeric); $('#auto-hide-results').prop('checked', options.scanning.autoHideResults); diff --git a/ext/bg/settings.html b/ext/bg/settings.html index c77f550c..fe4c32b1 100644 --- a/ext/bg/settings.html +++ b/ext/bg/settings.html @@ -105,6 +105,10 @@ +
+ +
+
-- cgit v1.2.3