From 8766744aa4a94193dd03bba39086e4522914e8ef Mon Sep 17 00:00:00 2001 From: toasted-nutbread Date: Sat, 16 Jan 2021 10:22:24 -0500 Subject: Popup window options (#1245) * Add popupWindow options * Add toBoolean converter * Add settings * Use new options * Add test link * Fix window state not working * Make the window section advanced only --- ext/bg/data/options-schema.json | 52 +++++++++++++++++++++++++++++++++++++++++ 1 file changed, 52 insertions(+) (limited to 'ext/bg/data') diff --git a/ext/bg/data/options-schema.json b/ext/bg/data/options-schema.json index 405d62a9..def279cc 100644 --- a/ext/bg/data/options-schema.json +++ b/ext/bg/data/options-schema.json @@ -63,6 +63,7 @@ "type": "object", "required": [ "general", + "popupWindow", "audio", "scanning", "translation", @@ -288,6 +289,57 @@ } } }, + "popupWindow": { + "type": "object", + "required": [ + "width", + "height", + "left", + "top", + "useLeft", + "useTop", + "windowType", + "windowState" + ], + "properties": { + "width": { + "type": "integer", + "minimum": 0, + "default": 400 + }, + "height": { + "type": "integer", + "minimum": 0, + "default": 250 + }, + "left": { + "type": "integer", + "default": 0 + }, + "top": { + "type": "integer", + "default": 0 + }, + "useLeft": { + "type": "boolean", + "default": false + }, + "useTop": { + "type": "boolean", + "default": false + }, + "windowType": { + "type": "string", + "enum": ["normal", "popup"], + "default": "popup" + }, + "windowState": { + "type": "string", + "enum": ["normal", "maximized", "fullscreen"], + "default": "normal" + } + } + }, "audio": { "type": "object", "required": [ -- cgit v1.2.3