MCPcopy Create free account
hub / github.com/Milkyroad/SCiPNET / changeCssVar

Function changeCssVar

public/src/js/script.js:1070–1097  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

1068window.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"))

Callers 1

script.jsFile · 0.85

Calls 2

$Function · 0.50
addMethod · 0.45

Tested by

no test coverage detected