| 1068 | window.changeAll = (condition) => { |
| 1069 | if (lockout == false) { |
| 1070 | function changeCssVar() { |
| 1071 | var $d = $("#cmdIframe").contents().find("body"); |
| 1072 | $("#cmdIframe") |
| 1073 | .contents() |
| 1074 | .find("body") |
| 1075 | .add($("body")) |
| 1076 | .add($("#comIframe").contents().find("body")) |
| 1077 | .css({ |
| 1078 | "--defaultTheme": color, |
| 1079 | "--defaultThemeRGB": hex2rgb(color), |
| 1080 | "--defaultText": textColor, |
| 1081 | "--defaultTextRGB": hex2rgb(textColor), |
| 1082 | "--defaultContrast": textContrastColor, |
| 1083 | "--defaultBackground": backgroundColor, |
| 1084 | }); |
| 1085 | $d.find(".textPicker").each(function () { |
| 1086 | $(this).val(textColor); |
| 1087 | }); |
| 1088 | $d.find(".contrastPicker").each(function () { |
| 1089 | $(this).val(textContrastColor); |
| 1090 | }); |
| 1091 | $d.find(".themePicker").each(function () { |
| 1092 | $(this).val(color); |
| 1093 | }); |
| 1094 | $d.find(".backgroundPicker").each(function () { |
| 1095 | $(this).val(backgroundColor); |
| 1096 | }); |
| 1097 | } |
| 1098 | if ($d == undefined || $m == undefined) { |
| 1099 | $("#cmdIframe") |
| 1100 | .add($("#comIframe")) |