Skip to content

Commit 256a3ad

Browse files
authored
Merge pull request #894 from rgantzos/main
Allow strings for option types
2 parents e9a4767 + 1b13a0b commit 256a3ad

File tree

1 file changed

+12
-0
lines changed

1 file changed

+12
-0
lines changed

extras/popup/popup.js

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -690,6 +690,18 @@ async function getFeatures() {
690690
if (feature.options) {
691691
for (var optionPlace in feature.options) {
692692
var option = feature.options[optionPlace];
693+
694+
if (typeof option.type === "string") {
695+
let OPTION_TYPES = {
696+
"string": 0,
697+
"boolean": 1,
698+
"number": 2,
699+
"color": 3,
700+
"select": 4,
701+
}
702+
option.type = OPTION_TYPES[option.type]
703+
}
704+
693705
let type = option.type
694706
if (type === 4) {
695707
var optionDiv = document.createElement("div");

0 commit comments

Comments
 (0)