aboutsummaryrefslogtreecommitdiff
path: root/ext/js/display/search-display-controller.js
diff options
context:
space:
mode:
authortoasted-nutbread <toasted-nutbread@users.noreply.github.com>2021-05-15 16:30:33 -0400
committerGitHub <noreply@github.com>2021-05-15 16:30:33 -0400
commit2c752fd89d3427da855704406e34c9458d33e832 (patch)
tree1af110210e39fccc008ef6c31940303a38ddc60a /ext/js/display/search-display-controller.js
parentbc6fb4e7d742b40bb18965f5aa3e8a1a867b068e (diff)
Popup action search (#1678)
* Set up search page in the action popup * Fix a style causing incorrect overflow * Fix error when trying to take a screenshot * Fix popup size on Firefox
Diffstat (limited to 'ext/js/display/search-display-controller.js')
-rw-r--r--ext/js/display/search-display-controller.js16
1 files changed, 15 insertions, 1 deletions
diff --git a/ext/js/display/search-display-controller.js b/ext/js/display/search-display-controller.js
index 95f8b6c1..8743166b 100644
--- a/ext/js/display/search-display-controller.js
+++ b/ext/js/display/search-display-controller.js
@@ -84,6 +84,10 @@ class SearchDisplayController {
this._onDisplayOptionsUpdated({options: this._display.getOptions()});
}
+ setMode(mode) {
+ this._setMode(mode, true);
+ }
+
// Actions
_onActionFocusSearchBox() {
@@ -329,13 +333,23 @@ class SearchDisplayController {
_updateClipboardMonitorEnabled() {
const enabled = this._clipboardMonitorEnabled;
this._clipboardMonitorEnableCheckbox.checked = enabled;
- if (enabled && this._searchPersistentStateController.mode !== 'popup') {
+ if (enabled && this._canEnableClipboardMonitor()) {
this._clipboardMonitor.start();
} else {
this._clipboardMonitor.stop();
}
}
+ _canEnableClipboardMonitor() {
+ switch (this._searchPersistentStateController.mode) {
+ case 'popup':
+ case 'action-popup':
+ return false;
+ default:
+ return true;
+ }
+ }
+
_requestPermissions(permissions) {
return new Promise((resolve) => {
chrome.permissions.request(